Class: Strut::MakeCommand
- Inherits:
-
SlimCommand
- Object
- SlimCommand
- Strut::MakeCommand
- Defined in:
- lib/strut/slim_command.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#instance ⇒ Object
readonly
Returns the value of attribute instance.
Attributes inherited from SlimCommand
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(id, metadata, instance, class_name) ⇒ MakeCommand
constructor
A new instance of MakeCommand.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id, metadata, instance, class_name) ⇒ MakeCommand
46 47 48 49 50 |
# File 'lib/strut/slim_command.rb', line 46 def initialize(id, , instance, class_name) super(id, ) @instance = instance @class_name = class_name end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
44 45 46 |
# File 'lib/strut/slim_command.rb', line 44 def class_name @class_name end |
#instance ⇒ Object (readonly)
Returns the value of attribute instance.
44 45 46 |
# File 'lib/strut/slim_command.rb', line 44 def instance @instance end |
Instance Method Details
#command ⇒ Object
52 53 54 |
# File 'lib/strut/slim_command.rb', line 52 def command "make" end |
#to_a ⇒ Object
56 57 58 |
# File 'lib/strut/slim_command.rb', line 56 def to_a super + [@instance, @class_name] end |
#to_s ⇒ Object
60 61 62 |
# File 'lib/strut/slim_command.rb', line 60 def to_s "#{super} #{@instance} = new #{@class_name}" end |