lib/strategies/proc.rb in motion_bindable-0.1.1 vs lib/strategies/proc.rb in motion_bindable-0.2.0

- old
+ new

@@ -1,16 +1,14 @@ module MotionBindable::Strategies class Proc < ::MotionBindable::Strategy - def refresh - update_attribute + def refresh_bound + bound.call end - private - - def update_attribute - self.attribute = bound.call + def on_bound_change(new = nil) + self.attribute = new || bound.call end end end