Class: Moblues::Reader::Relationship

Inherits:
Object
  • Object
show all
Defined in:
lib/moblues/reader/relationship.rb

Instance Method Summary collapse

Instance Method Details

#relationship(xml) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/moblues/reader/relationship.rb', line 7

def relationship(xml)
  DataModel::Relationship.new(
    name: xml.attributes['name'],
    destination_entity: xml.attributes['destinationEntity'],
    to_many: opt_bool(xml.attributes['toMany']),
    ordered: opt_bool(xml.attributes['ordered'])
  )
end