Class: GetOptions
- Inherits:
-
Object
- Object
- GetOptions
- Defined in:
- lib/bvwack/options.rb
Instance Method Summary collapse
-
#initialize ⇒ GetOptions
constructor
A new instance of GetOptions.
- #put_options ⇒ Object
Constructor Details
#initialize ⇒ GetOptions
Returns a new instance of GetOptions.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bvwack/options.rb', line 4 def initialize = {} option_parser = OptionParser.new do |opts| opts.on("-d", "--dry-run") do [:dry_run] = true end opts.on("-b BASE_DIR", "--base-dir BASE_DIR") do |base_dir| [:base_dir] = base_dir end opts.on("-c", "--clean-up") do [:clean_up] = true end opts.on("-n NUM_FILES", "--num-files NUM_FILES", Integer) do |num_files| [:num_files] = num_files end opts.on("-h", "--help") do [:help] = true end opts.on("-l", "--list-converted") do [:list_converted] = true end opts.on("-w", "--wack") do [:wack] = true end end option_parser.parse! end |
Instance Method Details
#put_options ⇒ Object
39 40 41 |
# File 'lib/bvwack/options.rb', line 39 def end |