Lines Matching full:options
47 def check_option(optparser, options, key) argument
48 return if options[key]
62 options = OpenStruct.new
65 opts.banner = 'Usage: gen.rb [options]'
78 optparser.parse!(into: options)
80 check_option(optparser, options, :data)
81 data = YAML.load_file(File.expand_path(options.data))
84 options&.require&.each { |r| require File.expand_path(r) } if options.require
87 if options.assert
88 require options.assert
92 check_option(optparser, options, :template)
93 template = File.read(File.expand_path(options.template))
94 output = options.output ? File.open(File.expand_path(options.output), 'w') : $stdout
96 t.filename = options.template