Class: PryCommandSetRegistry::CommandSet
- Inherits:
-
Pry::CommandSet
- Object
- Pry::CommandSet
- PryCommandSetRegistry::CommandSet
- Defined in:
- lib/pry_command_set_registry/command_set.rb
Instance Attribute Summary collapse
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, description, &block) ⇒ CommandSet
constructor
A new instance of CommandSet.
Constructor Details
#initialize(name, description, &block) ⇒ CommandSet
Returns a new instance of CommandSet.
5 6 7 8 9 10 11 |
# File 'lib/pry_command_set_registry/command_set.rb', line 5 def initialize(name, description, &block) raise "Block required!" unless block_given? super(&block) @description = description @name = name.to_s apply_group_name_to_commands end |
Instance Attribute Details
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
3 4 5 |
# File 'lib/pry_command_set_registry/command_set.rb', line 3 def commands @commands end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/pry_command_set_registry/command_set.rb', line 3 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/pry_command_set_registry/command_set.rb', line 3 def name @name end |