Sha256: 97912430f7da2a6e1d2c6a0381c223f7a989ec8c0fdd8a46482e5d8e4809fd79

Contents?: true

Size: 634 Bytes

Versions: 12

Compression:

Stored size: 634 Bytes

Contents

require 'resync'
require_relative 'client_delegator'

module Resync
  class Client
    module Mixins
      # A resource container that is capable of providing those resources with a {Client}
      module ResourceClientDelegate
        prepend ClientDelegator

        # Sets this object as the client provider delegate for each resource.
        # @param value [Array<Resource>] the resources for this list
        def resources=(value)
          super
          resources.each { |r| r.client_delegate = self }
        end
      end
    end
  end

  class BaseResourceList
    prepend Client::Mixins::ResourceClientDelegate
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
resync-client-0.4.3 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.4.2 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.4.1 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.4.0 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.5 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.4 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.3 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.2 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.1 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.3.0 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.2.5 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.2.4 lib/resync/client/mixins/resource_client_delegate.rb