Class: Strut::ImportCommand

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, namespace) ⇒ ImportCommand

Returns a new instance of ImportCommand.



25
26
27
28
# File 'lib/strut/slim_command.rb', line 25

def initialize(id, , namespace)
  super(id, )
  @namespace = namespace
end

Instance Attribute Details

#namespaceObject (readonly)

Returns the value of attribute namespace.



23
24
25
# File 'lib/strut/slim_command.rb', line 23

def namespace
  @namespace
end

Instance Method Details

#commandObject



30
31
32
# File 'lib/strut/slim_command.rb', line 30

def command
  "import"
end

#to_aObject



34
35
36
# File 'lib/strut/slim_command.rb', line 34

def to_a
  super + [@namespace]
end

#to_sObject



38
39
40
# File 'lib/strut/slim_command.rb', line 38

def to_s
  "#{super} import #{@namespace}"
end