Class: Parse::Cloud::Function
- Inherits:
-
Object
- Object
- Parse::Cloud::Function
- Defined in:
- lib/parse/cloud.rb
Instance Attribute Summary collapse
-
#function_name ⇒ Object
Returns the value of attribute function_name.
Instance Method Summary collapse
- #call(params = {}) ⇒ Object
-
#initialize(function_name) ⇒ Function
constructor
A new instance of Function.
- #uri ⇒ Object
Constructor Details
#initialize(function_name) ⇒ Function
Returns a new instance of Function.
7 8 9 |
# File 'lib/parse/cloud.rb', line 7 def initialize(function_name) @function_name = function_name end |
Instance Attribute Details
#function_name ⇒ Object
Returns the value of attribute function_name.
5 6 7 |
# File 'lib/parse/cloud.rb', line 5 def function_name @function_name end |
Instance Method Details
#call(params = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/parse/cloud.rb', line 15 def call(params={}) response = Parse.client.post(self.uri, params.to_json) result = response["result"] result end |
#uri ⇒ Object
11 12 13 |
# File 'lib/parse/cloud.rb', line 11 def uri Protocol.cloud_function_uri(@function_name) end |