Class: Webbynode::Application
Instance Attribute Summary collapse
-
#aliases ⇒ Object
readonly
Returns the value of attribute aliases.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*args) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(*args) ⇒ Application
Returns a new instance of Application.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/webbynode/application.rb', line 7 def initialize(*args) args = ["help", "commands"] unless args.any? if args.first.include?(":") arg = args.shift args.unshift arg.split(":")[1] args.unshift arg.split(":")[0] end @command = args.shift @params = args end |
Instance Attribute Details
#aliases ⇒ Object (readonly)
Returns the value of attribute aliases.
5 6 7 |
# File 'lib/webbynode/application.rb', line 5 def aliases @aliases end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/webbynode/application.rb', line 5 def command @command end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'lib/webbynode/application.rb', line 5 def params @params end |