Class: Strut::SlimCommand
- Inherits:
-
Object
- Object
- Strut::SlimCommand
- Defined in:
- lib/strut/slim_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(id, metadata) ⇒ SlimCommand
constructor
A new instance of SlimCommand.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id, metadata) ⇒ SlimCommand
Returns a new instance of SlimCommand.
8 9 10 11 |
# File 'lib/strut/slim_command.rb', line 8 def initialize(id, ) @id = id = end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/strut/slim_command.rb', line 5 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
6 7 8 |
# File 'lib/strut/slim_command.rb', line 6 def end |
Instance Method Details
#to_a ⇒ Object
13 14 15 |
# File 'lib/strut/slim_command.rb', line 13 def to_a [@id, command] end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/strut/slim_command.rb', line 17 def to_s sprintf("[%2d]", @id) end |