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.
- #|(other) ⇒ Object (also: #<=>)
Methods included from Runnable
Constructor Details
#initialize(path, *args) ⇒ Executable
Returns a new instance of Executable.
5 6 7 8 |
# File 'lib/chitin/commands/executable.rb', line 5 def initialize(path, *args) @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!!!!
16 17 18 19 |
# File 'lib/chitin/commands/executable.rb', line 16 def method_missing(name, *arr, &blk) setup name.to_s, *process_args(arr) self end |
Instance Method Details
#|(other) ⇒ Object Also known as: <=>
10 11 12 |
# File 'lib/chitin/commands/executable.rb', line 10 def |(other) Pipe.new self, other end |