Class: CFoundry::Client

Inherits:
BaseClient show all
Defined in:
lib/cfoundry/client.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#rest_client

Class Method Summary collapse

Methods inherited from BaseClient

#delete, #get, #info, #initialize, #password_score, #post, #put, #refresh_token!, #request, #request_raw, #stream_url, #token=, #trace=, #uaa

Constructor Details

This class inherits a constructor from CFoundry::BaseClient

Class Method Details

.new(*args) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/cfoundry/client.rb', line 33

def self.new(*args)
  target, _ = args

  base = super(target)

  case base.info[:version]
  when 2
    CFoundry::V2::Client.new(*args)
  else
    CFoundry::V1::Client.new(*args)
  end
end