Class: Linecook::Proxy

Inherits:
BasicObject
Defined in:
lib/linecook/proxy.rb

Overview

A proxy used to chain method calls back to a recipe.

Instance Method Summary collapse

Constructor Details

#initialize(recipe) ⇒ Proxy

Returns a new instance of Proxy.



4
5
6
# File 'lib/linecook/proxy.rb', line 4

def initialize(recipe)
  @recipe = recipe
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object

Invokes method via recipe.chain.



9
10
11
# File 'lib/linecook/proxy.rb', line 9

def method_missing(*args, &block)
  @recipe.chain.__send__(*args, &block)
end