class Manacle::Constraint::Actuator::Base

Public Class Methods

new(val, constraint) click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 16
def initialize(val, constraint)
  if val.kind_of?(self.class)
    raise 
  end
  @val = val
  @constraint = constraint
end

Public Instance Methods

constrain() click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 40
def constrain
  @constrained ||= @constraint.base_constrain(@val)
end
levels() click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 28
def levels
  [self.class, @val.class]
end
proxy() click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 32
def proxy
  Manacle::Proxy::Templates.for(@val)
end
reconstrain(obj) click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 36
def reconstrain(obj)
  self.class.new(obj, @constraint)
end
unconstrain() click to toggle source
# File lib/manacle/constraint/actuator/base.rb, line 24
def unconstrain
  @val
end