Class: Goldendocx::Tables::Cell
- Inherits:
-
Object
- Object
- Goldendocx::Tables::Cell
- Includes:
- Element
- Defined in:
- lib/goldendocx/tables/cell.rb
Direct Known Subclasses
Instance Method Summary collapse
- #align=(align) ⇒ Object
- #content=(content) ⇒ Object
-
#initialize(**attributes) ⇒ Cell
constructor
A new instance of Cell.
- #span=(span) ⇒ Object
Methods included from Element
#build_element, #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
#initialize(**attributes) ⇒ Cell
Returns a new instance of Cell.
14 15 16 17 18 |
# File 'lib/goldendocx/tables/cell.rb', line 14 def initialize(**attributes) attributes.each do |name, value| send("#{name}=", value) if respond_to?("#{name}=") end end |
Instance Method Details
#align=(align) ⇒ Object
24 25 26 |
# File 'lib/goldendocx/tables/cell.rb', line 24 def align=(align) text.property.align.align = align if align end |
#content=(content) ⇒ Object
20 21 22 |
# File 'lib/goldendocx/tables/cell.rb', line 20 def content=(content) text.run.build_text.value = content.to_s if content end |
#span=(span) ⇒ Object
28 29 30 |
# File 'lib/goldendocx/tables/cell.rb', line 28 def span=(span) property.grid_span.span = span if span end |