Class: U8::Command
- Inherits:
-
Object
- Object
- U8::Command
- Defined in:
- lib/u8/command.rb
Instance Method Summary collapse
-
#initialize(cmd, args = {}) ⇒ Command
constructor
A new instance of Command.
- #method_missing(*args) ⇒ Object
Constructor Details
#initialize(cmd, args = {}) ⇒ Command
Returns a new instance of Command.
4 5 6 7 |
# File 'lib/u8/command.rb', line 4 def initialize cmd, args={} @cmd = cmd.to_sym @options = args end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
9 10 11 12 |
# File 'lib/u8/command.rb', line 9 def method_missing *args @options U8.class_eval :exec, @cmd, args end |