Module: ArcWeld::Relationships::LocationOf
- Defined in:
- lib/arc_weld/relationships/location_of.rb
Instance Method Summary collapse
- #add_location_resource(res) ⇒ Object
- #add_location_resources(*resources) ⇒ Object
- #location_of_relationship ⇒ Object
- #related_location_of_references ⇒ Object
Instance Method Details
#add_location_resource(res) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/arc_weld/relationships/location_of.rb', line 4 def add_location_resource(res) unless location_of.include?(res) location_of.push(res) res.has_location=self unless res.has_location==self end end |
#add_location_resources(*resources) ⇒ Object
11 12 13 |
# File 'lib/arc_weld/relationships/location_of.rb', line 11 def add_location_resources(*resources) resources.each { |res| add_location_resource(res) } end |
#location_of_relationship ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/arc_weld/relationships/location_of.rb', line 19 def location_of_relationship unless location_of.empty? { 'locationOf' => { 'list!' => }} end end |
#related_location_of_references ⇒ Object
15 16 17 |
# File 'lib/arc_weld/relationships/location_of.rb', line 15 def (location_of.map { |resource| resource.ref.render }).join end |