Class: NCMB::Relation
- Inherits:
-
Array
- Object
- Array
- NCMB::Relation
- Includes:
- NCMB
- Defined in:
- lib/ncmb/relation.rb
Constant Summary
Constants included from NCMB
API_VERSION, DOMAIN, SCRIPT_API_VERSION, SCRIPT_DOMAIN
Instance Method Summary collapse
-
#initialize ⇒ Relation
constructor
A new instance of Relation.
- #to_json(a = '') ⇒ Object
Methods included from NCMB
Constructor Details
#initialize ⇒ Relation
7 8 9 |
# File 'lib/ncmb/relation.rb', line 7 def initialize end |
Instance Method Details
#to_json(a = '') ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ncmb/relation.rb', line 11 def to_json(a = '') params = { '__op': 'AddRelation' } params['objects'] = [] self.each do |obj| params['objects'] << { '__type': 'Pointer', 'className': obj.ClassName, 'objectId': obj.objectId } end params.to_json end |