Class: CFoundry::V2::Base
- Inherits:
-
BaseClient
- Object
- BaseClient
- CFoundry::V2::Base
- Defined in:
- lib/cfoundry/v2/base.rb
Instance Attribute Summary collapse
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#target ⇒ Object
Returns the value of attribute target.
-
#token ⇒ Object
Returns the value of attribute token.
-
#trace ⇒ Object
Returns the value of attribute trace.
Instance Method Summary collapse
-
#info ⇒ Object
Cloud metadata.
-
#initialize(target = "https://api.cloudfoundry.com", token = nil) ⇒ Base
constructor
A new instance of Base.
-
#uaa ⇒ Object
The UAA used for this client.
Methods inherited from BaseClient
Constructor Details
#initialize(target = "https://api.cloudfoundry.com", token = nil) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 18 |
# File 'lib/cfoundry/v2/base.rb', line 13 def initialize( target = "https://api.cloudfoundry.com", token = nil) @target = target @token = token end |
Instance Attribute Details
#proxy ⇒ Object
Returns the value of attribute proxy.
11 12 13 |
# File 'lib/cfoundry/v2/base.rb', line 11 def proxy @proxy end |
#target ⇒ Object
Returns the value of attribute target.
11 12 13 |
# File 'lib/cfoundry/v2/base.rb', line 11 def target @target end |
#token ⇒ Object
Returns the value of attribute token.
11 12 13 |
# File 'lib/cfoundry/v2/base.rb', line 11 def token @token end |
#trace ⇒ Object
Returns the value of attribute trace.
11 12 13 |
# File 'lib/cfoundry/v2/base.rb', line 11 def trace @trace end |
Instance Method Details
#info ⇒ Object
Cloud metadata
44 45 46 |
# File 'lib/cfoundry/v2/base.rb', line 44 def info get("info", nil => :json) end |
#uaa ⇒ Object
The UAA used for this client.
‘false` if no UAA (legacy)
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/cfoundry/v2/base.rb', line 30 def uaa return @uaa unless @uaa.nil? endpoint = info[:authorization_endpoint] return @uaa = false unless endpoint @uaa = CFoundry::UAAClient.new(endpoint) @uaa.trace = @trace @uaa.token = @token @uaa end |