Method: QB::Options.add
- Defined in:
- lib/qb/options.rb
.add(opts, options, role, include_path = []) ⇒ Object
Add the options from a role to the OptionParser
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/qb/options.rb', line 137 def self.add opts, , role, include_path = [] QB.debug "adding options", "role" => role role..each do || if .key? 'include' include_role opts, , , include_path else # create an option option = Option.new role, , include_path option.option_parser_add opts, included: !include_path.empty? [option.cli_name] = option end end # each var end |