Class: MotionBindable::Strategies::Proc
- Inherits:
-
MotionBindable::Strategy
- Object
- MotionBindable::Strategy
- MotionBindable::Strategies::Proc
- Defined in:
- lib/strategies/proc.rb
Constant Summary
Constants inherited from MotionBindable::Strategy
MotionBindable::Strategy::WATCH_TICK
Instance Attribute Summary
Attributes inherited from MotionBindable::Strategy
Instance Method Summary collapse
Methods inherited from MotionBindable::Strategy
#bind, find_by_reference, #initialize, register_strategy, #unbind
Constructor Details
This class inherits a constructor from MotionBindable::Strategy
Instance Method Details
#on_bound_change(new = nil) ⇒ Object
13 14 15 |
# File 'lib/strategies/proc.rb', line 13 def on_bound_change(new = nil) self.attribute = new || bound.call end |
#refresh_bound ⇒ Object
5 6 7 |
# File 'lib/strategies/proc.rb', line 5 def refresh_bound bound.call end |
#refresh_object ⇒ Object
9 10 11 |
# File 'lib/strategies/proc.rb', line 9 def refresh_object attribute end |