Class: Manacle::Proxy::Method::Unconstrained

Inherits:
Object
  • Object
show all
Includes:
Manacle::Proxy::Method
Defined in:
lib/manacle/proxy/method/unconstrained.rb

Instance Method Summary collapse

Methods included from Manacle::Proxy::Method

#initialize

Instance Method Details

#bind(proxy) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/manacle/proxy/method/unconstrained.rb', line 8

def bind(proxy)
  proxy.instance_exec(@name) do |name|
    define_method(name) do |*args|
      @constraint.method(name).call(*args)
    end
  end
end