Class: Slick::Command
Constant Summary
Constants included from Helpers
Helpers::SELF_CLOSING_TAGS, Helpers::TAGS, Helpers::TEXT_ONLY_TAGS
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
Attributes included from Registry
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ Command
constructor
A new instance of Command.
- #run ⇒ Object
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
#args ⇒ Object
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
#run ⇒ Object
25 26 27 |
# File 'lib/slick/command.rb', line 25 def run puts "No such command \"#{self.class.name}\"" end |