Class: Chitin::Executable
- Includes:
- Runnable
- Defined in:
- lib/chitin/commands/executable.rb
Instance Method Summary collapse
-
#initialize(path, *args) ⇒ Executable
constructor
A new instance of Executable.
-
#method_missing(name, *arr, &blk) ⇒ Object
EVERYTHING will be sent to the command.
Methods included from Runnable
#<, #>, #>>, #[], #^, #bg!, #bg?, #fg?, #|
Constructor Details
#initialize(path, *args) ⇒ Executable
Returns a new instance of Executable.
7 8 9 10 11 12 |
# File 'lib/chitin/commands/executable.rb', line 7 def initialize(path, *args) super() @path = path @args = process_args(args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *arr, &blk) ⇒ Object
EVERYTHING will be sent to the command. ERRTHANG!!!!
15 16 17 18 |
# File 'lib/chitin/commands/executable.rb', line 15 def method_missing(name, *arr, &blk) setup name.to_s, *process_args(arr) self end |