Class: Parse::Cloud::Function
- Inherits:
-
Object
- Object
- Parse::Cloud::Function
- Defined in:
- lib/parse/cloud.rb
Overview
Call cloud functions parseplatform.github.io/docs/cloudcode/guide/
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#function_name ⇒ Object
Returns the value of attribute function_name.
Instance Method Summary collapse
- #call(params = {}) ⇒ Object
-
#initialize(function_name, client = nil) ⇒ Function
constructor
A new instance of Function.
- #uri ⇒ Object
Constructor Details
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
8 9 10 |
# File 'lib/parse/cloud.rb', line 8 def client @client end |
#function_name ⇒ Object
Returns the value of attribute function_name.
7 8 9 |
# File 'lib/parse/cloud.rb', line 7 def function_name @function_name end |
Instance Method Details
#call(params = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/parse/cloud.rb', line 19 def call(params = {}) response = @client.post(uri, params.to_json) result = response['result'] result end |
#uri ⇒ Object
15 16 17 |
# File 'lib/parse/cloud.rb', line 15 def uri Protocol.cloud_function_uri(@function_name) end |