Class: Docxer::Word::Relationships::Relationship

Inherits:
Object
  • Object
show all
Defined in:
lib/docxer/word/relationships/relationship.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/docxer/word/relationships/relationship.rb', line 6

def id
  @id
end

#targetObject

Returns the value of attribute target.



6
7
8
# File 'lib/docxer/word/relationships/relationship.rb', line 6

def target
  @target
end

#typeObject

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