Class: Chitin::Executable

Inherits:
Object show all
Includes:
Runnable
Defined in:
lib/chitin/commands/executable.rb

Instance Method Summary collapse

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