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_path, #token_data

Constructor Details

This class inherits a constructor from CFoundry::BaseClient

Class Method Details

.new(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cfoundry/client.rb', line 8

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



21
22
23
# File 'lib/cfoundry/client.rb', line 21

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