Class: Slick::Command

Inherits:
Object show all
Extended by:
Registry
Includes:
Helpers
Defined in:
lib/slick/command.rb

Constant Summary

Constants included from Helpers

Helpers::SELF_CLOSING_TAGS, Helpers::TAGS, Helpers::TEXT_ONLY_TAGS

Instance Attribute Summary collapse

Attributes included from Registry

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Registry

create, for, register, registered?, registered_classes

Methods included from Helpers

#html_tag, #indent, #line, #text

Constructor Details

#initialize(*args) ⇒ Command

Returns a new instance of Command.



21
22
23
# File 'lib/slick/command.rb', line 21

def initialize(*args)
    @args = args
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



19
20
21
# File 'lib/slick/command.rb', line 19

def args
  @args
end

Class Method Details

.run(name = 'list-commands', *args) ⇒ Object



11
12
13
# File 'lib/slick/command.rb', line 11

def run(name = 'list-commands', *args)
    create(name, *args).run
end

Instance Method Details

#runObject



25
26
27
# File 'lib/slick/command.rb', line 25

def run
    puts "No such command \"#{self.class.name}\""
end