module Attune::Configurable

Constants

KEYS

Attributes

auth_token[RW]

The Authorization token

disabled[RW]

FIXME

disabled?[RW]

FIXME

endpoint[RW]

The HTTP endpoint to connect to

exception_handler[R]

How to deal with HTTP exceptions @param [:mock, :raise] handler Method used for handling exceptions. @raise [ArgumentError] if handler is not :mock or :raise

logger[RW]

Logger to write request statistics to

logging_enabled[RW]

Turn request logging on

middleware[RW]

Middleware used by faraday

timeout[RW]

Time (in seconds) to wait for requests to finish

Public Instance Methods

configure() { |self| ... } click to toggle source

@example configure

Attune.configure do |c|
  c.endpoint = "http://example.com:8080/"
  c.timeout  = 5
end
# File lib/attune/configurable.rb, line 53
def configure
  yield self
end
exception_handler=(handler) click to toggle source
# File lib/attune/configurable.rb, line 40
def exception_handler= handler
  if [:mock, :raise].include?(handler)
    @exception_handler = handler
  else
    raise ArgumentError, "exception_handler must be :mock or :raise"
  end
end