Class: OmniCli::Parser
- Inherits:
-
Object
- Object
- OmniCli::Parser
- Defined in:
- lib/omnicli/parser.rb
Overview
Parser for Omni CLI arguments from environment variables
Instance Method Summary collapse
-
#parse! ⇒ Hash{Symbol => Object}
Parse arguments from environment variables into a Hash with symbol keys.
Instance Method Details
#parse! ⇒ Hash{Symbol => Object}
Parse arguments from environment variables into a Hash with symbol keys
19 20 21 22 23 24 25 26 |
# File 'lib/omnicli/parser.rb', line 19 def parse! list = arg_list return {} if list.empty? list.each_with_object({}) do |name, args| args[name.downcase.to_sym] = parse_argument(name) end end |