Module: Correlate::Relationships
- Defined in:
- lib/correlate/relationships.rb,
lib/correlate/relationships/couchrest.rb,
lib/correlate/relationships/active_record.rb,
lib/correlate/relationships/active_record/collection_proxy.rb
Defined Under Namespace
Classes: ActiveRecord, CouchRest
Class Method Summary
collapse
Class Method Details
.build_correlation(name, type, opts) ⇒ Object
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/correlate/relationships.rb', line 19
def build_correlation( name, type, opts )
correlation = Correlation.new
correlation.name = name
correlation.type = type
correlation.target = opts[:class]
correlation.source = opts[:source]
correlation.rel = opts[:rel]
correlation.id_method = opts[:id_method]
correlation.requires = opts[:requires]
correlation.required = opts[:required]
correlation
end
|