Lines Matching full:options
31 def check_option(optparser, options, key) argument
32 return if options[key]
39 options = OpenStruct.new
42 opts.banner = 'Usage: gen.rb [options]'
54 optparser.parse!(into: options)
56 check_option(optparser, options, :datafile)
57 check_option(optparser, options, :template)
58 check_option(optparser, options, :output)
60 template_file = File.read(options.template)
61 output_file = File.open(options.output, 'w')
63 data = YAML.load_file(options.datafile)
65 options&.require&.each { |r| require r }
69 t.filename = options.template