Class: Parse::Relation
- Inherits:
-
Object
- Object
- Parse::Relation
- Defined in:
- lib/parse/relation.rb
Instance Method Summary collapse
-
#initialize(parent, column_name, hash) ⇒ Relation
constructor
A new instance of Relation.
- #load(parse_client = Parse::Client.default) ⇒ Object
Constructor Details
#initialize(parent, column_name, hash) ⇒ Relation
Returns a new instance of Relation.
4 5 6 7 8 |
# File 'lib/parse/relation.rb', line 4 def initialize parent, column_name, hash @parent_object = parent @column_name = column_name @raw_hash = hash end |
Instance Method Details
#load(parse_client = Parse::Client.default) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/parse/relation.rb', line 10 def load parse_client=Parse::Client.default unless @objects pointer = @parent_object.pointer key = @column_name = Parse::Object @raw_hash['className'] @objects = .find :where => proc { key, pointer } end @objects end |