class Harvest::HardyClient

Public Class Methods

new(client, max_retries) click to toggle source
Calls superclass method
# File lib/harvest/hardy_client.rb, line 3
    def initialize(client, max_retries)
      super(client)
      @_sd_obj = @client = client
      @max_retries = max_retries
      (@client.public_methods - Object.public_instance_methods).each do |name|
        instance_eval <<-END
          def #{name}(*args)
            wrap_collection do
              @client.send('#{name}', *args)
            end
          end
        END
      end
    end

Public Instance Methods

__getobj__() click to toggle source
# File lib/harvest/hardy_client.rb, line 18
def __getobj__; @_sd_obj; end
__setobj__(obj) click to toggle source
# File lib/harvest/hardy_client.rb, line 19
def __setobj__(obj); @_sd_obj = obj; end
wrap_collection() { || ... } click to toggle source
# File lib/harvest/hardy_client.rb, line 21
def wrap_collection
  collection = yield
  HardyCollection.new(collection, self, @max_retries)
end