Class: Goldendocx::Tables::ImageCell

Inherits:
Cell
  • Object
show all
Defined in:
lib/goldendocx/tables/image_cell.rb

Instance Method Summary collapse

Methods inherited from Cell

#align=, #initialize, #span=

Methods included from Element

#build_element, #initialize, #namespace, #tag, #tag_name, #to_element, #to_xml

Methods included from HasChildren

#children, #read_child, #read_children

Methods included from HasAttributes

#assign_attributes, #attributes, #read_attributes

Constructor Details

This class inherits a constructor from Goldendocx::Tables::Cell

Instance Method Details

#content=(content) ⇒ Object



16
17
18
19
20
# File 'lib/goldendocx/tables/image_cell.rb', line 16

def content=(content)
  return unless content

  image.build_run.build_text.value = content
end

#image=(image) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/goldendocx/tables/image_cell.rb', line 8

def image=(image)
  build_image(
    relationship_id: image.relationship_id,
    width: image.width,
    height: image.height
  )
end