Module: Manacle::Proxy::InstanceMethods
- Defined in:
- lib/manacle/proxy.rb
Instance Method Summary collapse
- #constrain ⇒ Object
- #initialize(constraint) ⇒ Object
- #inspect ⇒ Object
- #unconstrain ⇒ Object
- #unproxy ⇒ Object
Instance Method Details
#constrain ⇒ Object
12 13 14 |
# File 'lib/manacle/proxy.rb', line 12 def constrain @constrained ||= @constraint.constrain end |
#initialize(constraint) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/manacle/proxy.rb', line 20 def initialize(constraint) if constraint.nil? raise end unless constraint.kind_of?(Manacle::Constraint) raise end @constraint = constraint end |
#inspect ⇒ Object
4 5 6 |
# File 'lib/manacle/proxy.rb', line 4 def inspect "#<Manacle::Proxy::#{self.class} #<Manacle::Constraint::#{@constraint.class} #{@constraint.inspect}>" end |
#unconstrain ⇒ Object
16 17 18 |
# File 'lib/manacle/proxy.rb', line 16 def unconstrain @constraint.unconstrain end |
#unproxy ⇒ Object
8 9 10 |
# File 'lib/manacle/proxy.rb', line 8 def unproxy @constraint end |