Class: DynamicImageElements::TableCellElement
- Inherits:
-
BlockElement
- Object
- BlockElement
- DynamicImageElements::TableCellElement
- Defined in:
- lib/elements/table_cell_element.rb
Overview
Element is used for compositing another elements in it. It’s inherited from BlockElement and can be used in same way.
Instance Method Summary collapse
-
#height ⇒ Object
Gets height for inner elements.
-
#initialize(options, parent = nil, &block) ⇒ TableCellElement
constructor
Table cell element accepts options
Hash
. -
#width ⇒ Object
Gets width for inner elements.
Methods inherited from BlockElement
Methods included from ElementInterface
#final_size, #set_height, #set_width
Constructor Details
#initialize(options, parent = nil, &block) ⇒ TableCellElement
Table cell element accepts options Hash
. Block can be given and class provides element self to composite elements in it.
See BlockElement.new for more information
Options
Options are same as for BlockElement. You can also use further options to set cell behavior.
- :colspan
-
Sets number of columns which this cells takes. Don’t create next cells for already taken space.
- :rowspan
-
Sets number of rows which this cells takes. Don’t create next cells for already taken space.
- :width
-
Same as described in BlockElement. You can also set
"0%"
to fit all remaining space and ather elements will fit to its minimum size.
21 22 23 |
# File 'lib/elements/table_cell_element.rb', line 21 def initialize(, parent = nil, &block) # :yields: block_element super , parent, &block end |
Instance Method Details
#height ⇒ Object
Gets height for inner elements
30 31 32 |
# File 'lib/elements/table_cell_element.rb', line 30 def height #:nodoc: @options[:height] end |
#width ⇒ Object
Gets width for inner elements
26 27 28 |
# File 'lib/elements/table_cell_element.rb', line 26 def width #:nodoc: @options[:width] end |