Class: Songkick::Transport::HttParty

Inherits:
Object
  • Object
show all
Defined in:
lib/songkick/transport/httparty.rb

Defined Under Namespace

Classes: Adapter

Class Method Summary collapse

Class Method Details

.new(host, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/songkick/transport/httparty.rb', line 7

def self.new(host, options = {})
  adapter_class = options.delete(:adapter) || Adapter
  adapter_class.format(options[:format] || DEFAULT_FORMAT)
  adapter_class.default_timeout(options[:timeout] || DEFAULT_TIMEOUT)
  adapter_class.new(host, options)
end