ParseModel 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -50,6 +50,18 @@ end)
50
50
 
51
51
  ```
52
52
 
53
+ ### New: Cloud Code functions (experimental)
54
+
55
+ ```ruby
56
+ # with block:
57
+ ParseModel::Cloud.callFunction("myFunction", {"myParam" => "myValue"}) do |result, error|
58
+ # do something...
59
+ end
60
+
61
+ # without block:
62
+ ParseModel::Cloud.callFunction("myFunction", {"myParam" => "myValue"})
63
+ ```
64
+
53
65
  ### Users
54
66
 
55
67
  ```ruby
@@ -0,0 +1,19 @@
1
+
2
+ # with block:
3
+ # ParseModel::Cloud.callFunction("myFunction", {"myParam" => "myValue"}) do |result, error|
4
+ # # do something...
5
+ # end
6
+
7
+ # without block:
8
+ # ParseModel::Cloud.callFunction("myFunction", {"myParam" => "myValue"})
9
+ module ParseModel
10
+ class Cloud
11
+ def self.callFunction(function, params={}, &block)
12
+ return PFCloud.callFunction(function, withParameters:params) unless block_given?
13
+
14
+ PFCloud.callFunctionInBackground(function, withParameters:params, block:lambda do |result, error|
15
+ block.call(result, error)
16
+ end)
17
+ end
18
+ end
19
+ end
@@ -3,9 +3,11 @@ module ParseModel
3
3
 
4
4
  def setClassObject(classObject)
5
5
  @classObject = classObject
6
+ self
6
7
  end
7
8
 
8
9
  def initWithClassNameAndClassObject(className, classObject:myClassObject)
10
+ @className = className
9
11
  self.initWithClassName(className)
10
12
  self.setClassObject(myClassObject)
11
13
  self
@@ -1,3 +1,3 @@
1
1
  module ParseModel
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ParseModel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-02 00:00:00.000000000 Z
12
+ date: 2012-09-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: An Active Record pattern for your Parse models on RubyMotion.
15
15
  email:
@@ -37,6 +37,7 @@ files:
37
37
  - lib/ParseModel.rb
38
38
  - lib/ParseModel/Model.rb
39
39
  - lib/ParseModel/User.rb
40
+ - lib/ParseModel/cloud.rb
40
41
  - lib/ParseModel/query.rb
41
42
  - lib/ParseModel/version.rb
42
43
  homepage: ''