Class: CFoundry::Client

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

Constant Summary

Constants inherited from BaseClient

BaseClient::LOG_LENGTH

Instance Attribute Summary

Attributes inherited from BaseClient

#backtrace, #log, #trace

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseClient

#initialize, #request, #request_path, #request_uri, #token_data

Constructor Details

This class inherits a constructor from CFoundry::BaseClient

Class Method Details

.new(*args) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/cfoundry/client.rb', line 23

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

Instance Method Details

#infoObject



36
37
38
# File 'lib/cfoundry/client.rb', line 36

def info
  get("info", :accept => :json)
end