class Docxi::Word::Relationships::Relationship
Attributes
id[RW]
target[RW]
tm[RW]
type[RW]
Public Class Methods
new(id, type, target, tm = '')
click to toggle source
# File lib/docxi/word/relationships/relationship.rb, line 8 def initialize(id, type, target, tm = '') @id = id @type = type @target = target @tm = tm end
Public Instance Methods
build(xml)
click to toggle source
# File lib/docxi/word/relationships/relationship.rb, line 15 def build(xml) if @tm.blank? xml.Relationship('Id' => @id, 'Type' => @type, 'Target' => @target) else xml.Relationship('Id' => @id, 'Type' => @type, 'Target' => @target, 'TargetMode' => @tm) end end