Sha256: a498569a7283a00661cb90c13b3aba7c467aecaf4a31854120c64884202fdbcb

Contents?: true

Size: 259 Bytes

Versions: 5

Compression:

Stored size: 259 Bytes

Contents

module MotionPrime
  module DelegateMixin
    def delegated_by(view)
      @delegated_views ||= []
      @delegated_views << view
    end

    def clear_delegated
      Array.wrap(@delegated_views).each { |view| view.try(:setDelegate, nil) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
motion-prime-1.0.7 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.6 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.5 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.4 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.3 motion-prime/sections/_delegate_mixin.rb