class Bow::Options
Constants
- OPTIONS
Public Class Methods
new(options)
click to toggle source
# File lib/bow/options.rb, line 38 def initialize(options) @options = options end
Public Instance Methods
option_copy_tool(copy_tool)
click to toggle source
# File lib/bow/options.rb, line 65 def option_copy_tool(copy_tool) @options[:copy_tool] = copy_tool end
option_group(group)
click to toggle source
# File lib/bow/options.rb, line 57 def option_group(group) @options[:group] = group end
option_inventory(inventory)
click to toggle source
# File lib/bow/options.rb, line 61 def option_inventory(inventory) @options[:inventory] = inventory end
option_user(user)
click to toggle source
# File lib/bow/options.rb, line 53 def option_user(user) @options[:user] = user end
option_version(_v)
click to toggle source
# File lib/bow/options.rb, line 69 def option_version(_v) puts VERSION exit end
parse(opts)
click to toggle source
# File lib/bow/options.rb, line 42 def parse(opts) OPTIONS.each do |definition| callable = definition.pop opts.on(*definition, method(callable)) end opts.on_tail('-h', '--help', 'Print this help and exit.') do puts opts exit end end