Class: Docxi::Relationships::Relationship
- Inherits:
-
Object
- Object
- Docxi::Relationships::Relationship
- Defined in:
- lib/docxi/relationships/relationship.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#target ⇒ Object
Returns the value of attribute target.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #build(xml) ⇒ Object
-
#initialize(id, type, target) ⇒ Relationship
constructor
A new instance of Relationship.
Constructor Details
#initialize(id, type, target) ⇒ Relationship
Returns a new instance of Relationship.
7 8 9 10 11 |
# File 'lib/docxi/relationships/relationship.rb', line 7 def initialize(id, type, target) @id = id @type = type @target = target end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/docxi/relationships/relationship.rb', line 5 def id @id end |
#target ⇒ Object
Returns the value of attribute target.
5 6 7 |
# File 'lib/docxi/relationships/relationship.rb', line 5 def target @target end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/docxi/relationships/relationship.rb', line 5 def type @type end |
Instance Method Details
#build(xml) ⇒ Object
13 14 15 |
# File 'lib/docxi/relationships/relationship.rb', line 13 def build(xml) xml.Relationship('Id' => @id, 'Type' => @type, 'Target' => @target) end |