class Proforma::Modeling::Table::Cell
The lowest unit of a table. Each row is comprised of zero or more cells.
Attributes
align[W]
text[W]
width[W]
Public Class Methods
new(align: LEFT, text: '', width: nil)
click to toggle source
# File lib/proforma/modeling/table/cell.rb, line 21 def initialize(align: LEFT, text: '', width: nil) @align = align @text = text @width = width end
Public Instance Methods
align()
click to toggle source
# File lib/proforma/modeling/table/cell.rb, line 27 def align @align || LEFT end
compile(data, evaluator)
click to toggle source
# File lib/proforma/modeling/table/cell.rb, line 39 def compile(data, evaluator) self.class.new( align: align, text: evaluator.text(data, text), width: width ) end
text()
click to toggle source
# File lib/proforma/modeling/table/cell.rb, line 31 def text @text.to_s end
width()
click to toggle source
# File lib/proforma/modeling/table/cell.rb, line 35 def width @width ? @width.to_f : nil end