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.
9 10 11 12 13 14 15 |
# File 'lib/chitin/commands/executable.rb', line 9 def initialize(path, *args) super() @path = path @args = process_args(args) @suspended = false 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!!!!
18 19 20 21 22 23 24 25 |
# File 'lib/chitin/commands/executable.rb', line 18 def method_missing(name, *arr, &blk) if @suspended super(name, *arr, &blk) else setup name.to_s, *process_args(arr) self end end |