Class: Association
- Inherits:
-
Object
- Object
- Association
- Defined in:
- lib/xmimodel/association.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(xml, parent) ⇒ Association
constructor
TODO Build AssociationEnd class.
- #to_s ⇒ Object
Constructor Details
#initialize(xml, parent) ⇒ Association
TODO Build AssociationEnd class
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/xmimodel/association.rb', line 11 def initialize(xml, parent) @xml = xml @parent = parent @id = xml.attribute("xmi.id").to_s @name = xml.attribute("name").to_s.strip #association_end_a #association_end_b end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/xmimodel/association.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/xmimodel/association.rb', line 8 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
5 6 7 |
# File 'lib/xmimodel/association.rb', line 5 def parent @parent end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
4 5 6 |
# File 'lib/xmimodel/association.rb', line 4 def xml @xml end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/xmimodel/association.rb', line 22 def to_s "Association[#{@name}]" end |