Class: PryCommandSetRegistry::CommandSet

Inherits:
Pry::CommandSet
  • Object
show all
Defined in:
lib/pry_command_set_registry/command_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandsObject (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

#descriptionObject (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

#nameObject (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