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.
8 9 10 |
# File 'lib/parse/cloud.rb', line 8 def initialize(function_name) @function_name = function_name end |
Instance Attribute Details
#function_name ⇒ Object
Returns the value of attribute function_name.
6 7 8 |
# File 'lib/parse/cloud.rb', line 6 def function_name @function_name end |
Instance Method Details
#call(params = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/parse/cloud.rb', line 16 def call(params={}) response = Parse.client.post(self.uri, params.to_json) result = response["result"] result end |
#uri ⇒ Object
12 13 14 |
# File 'lib/parse/cloud.rb', line 12 def uri Protocol.cloud_function_uri(@function_name) end |