Class: Sovren::Association
- Inherits:
-
Object
- Object
- Sovren::Association
- Defined in:
- lib/sovren/association.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#role ⇒ Object
Returns the value of attribute role.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/sovren/association.rb', line 3 def name @name end |
#role ⇒ Object
Returns the value of attribute role.
3 4 5 |
# File 'lib/sovren/association.rb', line 3 def role @role end |
Class Method Details
.parse(associations) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/sovren/association.rb', line 5 def self.parse(associations) return Array.new if associations.nil? result = associations.css('Association').collect do |item| c = Association.new c.name = item.css('Name').first.text c.role = item.css('Role Name').text c end result end |