Class: Strut::MakeCommand

Inherits:
SlimCommand show all
Defined in:
lib/strut/slim_command.rb

Instance Attribute Summary collapse

Attributes inherited from SlimCommand

#id, #metadata

Instance Method Summary collapse

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_nameObject (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

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

#commandObject



52
53
54
# File 'lib/strut/slim_command.rb', line 52

def command
  "make"
end

#to_aObject



56
57
58
# File 'lib/strut/slim_command.rb', line 56

def to_a
  super + [@instance, @class_name]
end

#to_sObject



60
61
62
# File 'lib/strut/slim_command.rb', line 60

def to_s
  "#{super} #{@instance} = new #{@class_name}"
end