Class: Proforma::Modeling::Pane::Line
- Inherits:
-
Object
- Object
- Proforma::Modeling::Pane::Line
- Includes:
- Compiling::Compilable
- Defined in:
- lib/proforma/modeling/pane/line.rb
Overview
A line is a single label:value entry in a pane.
Instance Attribute Summary collapse
Instance Method Summary collapse
- #compile(record, evaluator) ⇒ Object
-
#initialize(label: '', value: '') ⇒ Line
constructor
A new instance of Line.
Constructor Details
#initialize(label: '', value: '') ⇒ Line
Returns a new instance of Line.
20 21 22 23 |
# File 'lib/proforma/modeling/pane/line.rb', line 20 def initialize(label: '', value: '') @label = label @value = value end |
Instance Attribute Details
#label ⇒ Object
25 26 27 |
# File 'lib/proforma/modeling/pane/line.rb', line 25 def label @label.to_s end |
#value ⇒ Object
29 30 31 |
# File 'lib/proforma/modeling/pane/line.rb', line 29 def value @value.to_s end |
Instance Method Details
#compile(record, evaluator) ⇒ Object
33 34 35 36 37 38 |
# File 'lib/proforma/modeling/pane/line.rb', line 33 def compile(record, evaluator) self.class.new( label: evaluator.text(record, label), value: evaluator.text(record, value) ) end |