Class: Rubycli::CLI::CommandCatalog
- Inherits:
-
Struct
- Object
- Struct
- Rubycli::CLI::CommandCatalog
- Defined in:
- lib/rubycli/cli.rb
Instance Attribute Summary collapse
-
#alias_map ⇒ Object
Returns the value of attribute alias_map.
-
#duplicates ⇒ Object
Returns the value of attribute duplicates.
-
#entries ⇒ Object
Returns the value of attribute entries.
Instance Method Summary collapse
Instance Attribute Details
#alias_map ⇒ Object
Returns the value of attribute alias_map
13 14 15 |
# File 'lib/rubycli/cli.rb', line 13 def alias_map @alias_map end |
#duplicates ⇒ Object
Returns the value of attribute duplicates
13 14 15 |
# File 'lib/rubycli/cli.rb', line 13 def duplicates @duplicates end |
#entries ⇒ Object
Returns the value of attribute entries
13 14 15 |
# File 'lib/rubycli/cli.rb', line 13 def entries @entries end |
Instance Method Details
#commands ⇒ Object
22 23 24 |
# File 'lib/rubycli/cli.rb', line 22 def commands entries.map(&:command) end |
#entries_for(category) ⇒ Object
18 19 20 |
# File 'lib/rubycli/cli.rb', line 18 def entries_for(category) entries.select { |entry| entry.category == category } end |
#lookup(command) ⇒ Object
14 15 16 |
# File 'lib/rubycli/cli.rb', line 14 def lookup(command) alias_map[command] end |