Class: Sobriquet::Command
- Inherits:
-
Object
- Object
- Sobriquet::Command
- Defined in:
- lib/sobriquet/command.rb
Overview
Command hold value of the command
Instance Attribute Summary collapse
-
#alias ⇒ Object
readonly
Returns the value of attribute alias.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(data) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(data) ⇒ Command
Returns a new instance of Command.
5 6 7 8 9 10 |
# File 'lib/sobriquet/command.rb', line 5 def initialize(data) @value = data[0] @alias = data[1] @description = data[2] @type = data[3] end |
Instance Attribute Details
#alias ⇒ Object (readonly)
Returns the value of attribute alias.
4 5 6 |
# File 'lib/sobriquet/command.rb', line 4 def alias @alias end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/sobriquet/command.rb', line 4 def description @description end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/sobriquet/command.rb', line 4 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/sobriquet/command.rb', line 4 def value @value end |