Class: Docxer::Word::Relationships::Relationship
- Inherits:
-
Object
- Object
- Docxer::Word::Relationships::Relationship
- Defined in:
- lib/docxer/word/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.
8 9 10 11 12 |
# File 'lib/docxer/word/relationships/relationship.rb', line 8 def initialize(id, type, target) @id = id @type = type @target = target end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/docxer/word/relationships/relationship.rb', line 6 def id @id end |
#target ⇒ Object
Returns the value of attribute target.
6 7 8 |
# File 'lib/docxer/word/relationships/relationship.rb', line 6 def target @target end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/docxer/word/relationships/relationship.rb', line 6 def type @type end |
Instance Method Details
#build(xml) ⇒ Object
14 15 16 |
# File 'lib/docxer/word/relationships/relationship.rb', line 14 def build(xml) xml.Relationship('Id' => @id, 'Type' => @type, 'Target' => @target) end |