Sha256: 49c115e9a9b5bdf2b41662c2f9713dc113f3748b456e040b89c92787ec369b6c

Contents?: true

Size: 270 Bytes

Versions: 2

Compression:

Stored size: 270 Bytes

Contents

module MotionBindable::Strategies

  class Proc < ::MotionBindable::Strategy

    def refresh_bound
      bound.call
    end

    def refresh_object
      attribute
    end

    def on_bound_change(new = nil)
      self.attribute = new || bound.call
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
motion_bindable-0.2.4 lib/strategies/proc.rb
motion_bindable-0.2.3 lib/strategies/proc.rb