Class: Diversion::Client

Inherits:
Object
  • Object
show all
Includes:
Configurable, Decode, Encode
Defined in:
lib/diversion/client.rb

Constant Summary

Constants included from Decode

Decode::DECODERS

Constants included from Signing

Signing::MAX_SIGN_LENGTH

Constants included from Encode

Encode::ENCODERS

Instance Attribute Summary

Attributes included from Configurable

#encode_uris, #host, #path, #port, #sign_key, #sign_length, #url_decoding, #url_encoding

Instance Method Summary collapse

Methods included from Decode

#decode

Methods included from Signing

sign_data

Methods included from Encode

#encode

Methods included from Encode::Json

get_url

Methods included from Configurable

#configure, keys, #reset!

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
# File 'lib/diversion/client.rb', line 13

def initialize(options={})
  Diversion::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Diversion.instance_variable_get(:"@#{key}"))
  end
end