Sha256: 4382fda4a9f4850462116a4e3aedbf0eef751c5a2941ab09689a064321e5dff1

Contents?: true

Size: 253 Bytes

Versions: 28

Compression:

Stored size: 253 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.setDelegate(nil) }
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
motion-prime-1.0.2 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.1 motion-prime/sections/_delegate_mixin.rb
motion-prime-1.0.0 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.9.2 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.9.1 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.9 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.8 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.7 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.6 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.5 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.4 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.3 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.2 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.1 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.9.0 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.8.12 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.8.11 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.8.10 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.8.9 motion-prime/sections/_delegate_mixin.rb
motion-prime-0.8.8 motion-prime/sections/_delegate_mixin.rb