class Handiv::Client

Attributes

options[R]

Public Class Methods

new(options = {}) click to toggle source
# File lib/handiv/client.rb, line 10
def initialize(options = {})
  @options = options

  set_config_from_options
end

Public Instance Methods

config()
Alias for: configuration
configuration() click to toggle source
# File lib/handiv/client.rb, line 20
def configuration
  @configuration ||= Configuration.new
end
Also aliased as: config
configure() { |configuration| ... } click to toggle source
# File lib/handiv/client.rb, line 29
def configure
  yield(configuration) if block_given?
  true
end
connection() click to toggle source
# File lib/handiv/client.rb, line 25
def connection
  Connection.new(self)
end
logger() click to toggle source
# File lib/handiv/client.rb, line 16
def logger
  @logger ||= Logger.new(self)
end
report_task(task_id, options = {}) click to toggle source
# File lib/handiv/client.rb, line 34
def report_task(task_id, options = {})
  Tasks::Reporter.new(self, task_id, options).report
end

Private Instance Methods

set_config_from_options() click to toggle source
# File lib/handiv/client.rb, line 40
def set_config_from_options
  options.each do |key, value|
    next unless configuration.respond_to?("#{key}=")

    configuration.send("#{key}=", value)
  end
end