Class: DBD4::Relations
Instance Attribute Summary
Attributes inherited from OrderedHash
#order
Instance Method Summary
collapse
Methods inherited from OrderedHash
#==, [], #clear, #delete, #delete_if, #each, #each_key, #each_value, #first, #initialize, #inspect, #invert, #keys, #last, #merge, #orig_store, #pop, #push, #reject, #reject!, #replace, #select, #shift, #store, #store_only, #to_a, #to_s, #unshift, #update, #values
Instance Method Details
#<<(relation) ⇒ Object
465
466
467
|
# File 'lib/dbd4/dbd4_model_file.rb', line 465
def <<(relation)
self[relation.id] = relation
end
|
#fix_many2many ⇒ Object
469
470
471
|
# File 'lib/dbd4/dbd4_model_file.rb', line 469
def fix_many2many
each_value { |v| v.fix_many2many }
end
|
#resolve(allObjects) ⇒ Object
473
474
475
476
|
# File 'lib/dbd4/dbd4_model_file.rb', line 473
def resolve(allObjects)
each_key { |k| self[k] = allObjects[:relations][k] }
each_value { |v| v.resolve(allObjects) }
end
|
#to_str ⇒ Object
482
483
484
|
# File 'lib/dbd4/dbd4_model_file.rb', line 482
def to_str
values.collect { |v| v.to_str + "\n" }.join("")
end
|
#validate(messages) ⇒ Object
478
479
480
|
# File 'lib/dbd4/dbd4_model_file.rb', line 478
def validate(messages)
each_value { |v| v.validate(messages) }
end
|