Class: NCMB::DataStore
- Inherits:
-
Object
- Object
- NCMB::DataStore
- Defined in:
- lib/ncmb/data_store.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #get(queries = {}) ⇒ Object
-
#initialize(client, name) ⇒ DataStore
constructor
A new instance of DataStore.
- #post(queries = {}) ⇒ Object
Constructor Details
#initialize(client, name) ⇒ DataStore
Returns a new instance of DataStore.
4 5 6 7 |
# File 'lib/ncmb/data_store.rb', line 4 def initialize(client, name) @client = client @name = name end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/ncmb/data_store.rb', line 3 def client @client end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/ncmb/data_store.rb', line 3 def name @name end |
Instance Method Details
#get(queries = {}) ⇒ Object
9 10 11 12 |
# File 'lib/ncmb/data_store.rb', line 9 def get(queries = {}) path = "/#{@client.api_version}/classes/#{@name}" @client.get path, queries end |
#post(queries = {}) ⇒ Object
14 15 16 17 |
# File 'lib/ncmb/data_store.rb', line 14 def post(queries = {}) path = "/#{@client.api_version}/classes/#{@name}" @client.post path, queries end |