Class: MotionBindable::Strategies::Proc
Constant Summary
MotionBindable::Strategy::WATCH_TICK
Instance Attribute Summary
#attr_name, #bound, #object
Instance Method Summary
collapse
#bind, find_by_reference, #initialize, register_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
|
#unbind ⇒ Object
17
18
19
20
|
# File 'lib/strategies/proc.rb', line 17
def unbind
@watching = false
super
end
|