Sha256: 0abc7993732bccbb9b02e527aea9b537cab78bf95ee9d6964f6e8b4cf727b49d

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

require_relative 'client_delegator'

# A resource container that is capable of providing those resources with a {Client}
module Resync
  class Client
    module Mixins
      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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resync-client-0.2.3 lib/resync/client/mixins/resource_client_delegate.rb
resync-client-0.2.1 lib/resync/client/mixins/resource_client_delegate.rb