Class: Elscripto::Command
- Inherits:
-
Object
- Object
- Elscripto::Command
- Defined in:
- lib/elscripto/command.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#system_call ⇒ Object
readonly
Returns the value of attribute system_call.
Instance Method Summary collapse
-
#initialize(name, options = {}) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(name, options = {}) ⇒ Command
Returns a new instance of Command.
5 6 7 8 9 10 |
# File 'lib/elscripto/command.rb', line 5 def initialize name, = {} raise ArgumentError.new 'Elscripto commands need a name spectacularrr' if blank? name @name = name @system_call = blank?([:command]) ? builtin_commands[name] : .delete(:command) raise ArgumentError.new 'Elscripto commands need a command spectacularrr' if blank? @system_call end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/elscripto/command.rb', line 3 def name @name end |
#system_call ⇒ Object (readonly)
Returns the value of attribute system_call.
3 4 5 |
# File 'lib/elscripto/command.rb', line 3 def system_call @system_call end |