Class: GoodData::Rest::Object
- Extended by:
- Mixin::DataPropertyReader, Mixin::DataPropertyWriter, Mixin::MetaPropertyReader, Mixin::MetaPropertyWriter
- Defined in:
- lib/gooddata/rest/object.rb
Overview
Base class dealing with REST endpoints
MUST Be interface for objects dealing with REST endpoints MUST provide way to work with remote REST-like API in unified manner. MUST NOT create new connections.
Direct Known Subclasses
Instance Attribute Summary collapse
- #client(opts = {}) ⇒ Object
-
#json ⇒ Object
(also: #raw_data, #to_hash, #to_json)
Returns the value of attribute json.
-
#project ⇒ Object
Returns the value of attribute project.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(_opts = {}) ⇒ Object
constructor
A new instance of Object.
- #saved? ⇒ Boolean
Methods included from Mixin::DataPropertyReader
Methods included from Mixin::DataPropertyWriter
Methods included from Mixin::MetaPropertyReader
Methods included from Mixin::MetaPropertyWriter
Methods included from Mixin::MetaGetter
Methods included from Mixin::DataGetter
Methods included from Mixin::RootKeyGetter
Methods included from Mixin::ContentGetter
Constructor Details
permalink #initialize(_opts = {}) ⇒ Object
Returns a new instance of Object.
49 50 51 |
# File 'lib/gooddata/rest/object.rb', line 49 def initialize(_opts = {}) @client = nil end |
Instance Attribute Details
permalink #client(opts = {}) ⇒ Object
53 54 55 |
# File 'lib/gooddata/rest/object.rb', line 53 def client(opts = {}) @client || GoodData::Rest::Object.client(opts) end |
Class Method Details
permalink .client(opts = { :client => GoodData.connection }) ⇒ Object
[View source]
65 66 67 |
# File 'lib/gooddata/rest/object.rb', line 65 def client(opts = { :client => GoodData.connection }) opts[:client] # || GoodData.client end |
permalink .default_client ⇒ Object
[View source]
62 63 |
# File 'lib/gooddata/rest/object.rb', line 62 def default_client end |
Instance Method Details
permalink #saved? ⇒ Boolean
57 58 59 |
# File 'lib/gooddata/rest/object.rb', line 57 def saved? !uri.blank? end |