Module: Bamboo::Client

Defined in:
lib/bamboo-client.rb,
lib/bamboo-client/http.rb,
lib/bamboo-client/rest.rb,
lib/bamboo-client/remote.rb,
lib/bamboo-client/version.rb,
lib/bamboo-client/abstract.rb,
lib/bamboo-client/http/xml.rb,
lib/bamboo-client/http/json.rb,
lib/bamboo-client/http/abstract.rb

Defined Under Namespace

Modules: Http Classes: Abstract, Error, Remote, Rest

Constant Summary collapse

VERSION =
"0.1.9"

Class Method Summary collapse

Class Method Details

.for(sym, url) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/bamboo-client.rb', line 17

def self.for(sym, url)
  case sym.to_sym
  when :rest
    Rest.new Http::Json.new(url)
  when :remote, :legacy
    Remote.new Http::Xml.new(url)
  else
    raise ArgumentError, "unknown client #{sym.inspect}"
  end
end