Class: NtiReceiptBuilder::RenderResult
- Inherits:
-
Object
- Object
- NtiReceiptBuilder::RenderResult
- Defined in:
- lib/nti_receipt_builder/render_result.rb
Overview
The output of one render: presenters in paint order, whether the content overflows the printable area, and how tall it actually is. Not cached — one per render, holding no references after the response.
Instance Attribute Summary collapse
-
#content_height_mm ⇒ Object
readonly
Returns the value of attribute content_height_mm.
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Instance Method Summary collapse
-
#initialize(elements:, overflow:, content_height_mm:) ⇒ RenderResult
constructor
A new instance of RenderResult.
- #overflow? ⇒ Boolean
Constructor Details
#initialize(elements:, overflow:, content_height_mm:) ⇒ RenderResult
Returns a new instance of RenderResult.
10 11 12 13 14 |
# File 'lib/nti_receipt_builder/render_result.rb', line 10 def initialize(elements:, overflow:, content_height_mm:) @elements = elements @overflow = overflow @content_height_mm = content_height_mm end |
Instance Attribute Details
#content_height_mm ⇒ Object (readonly)
Returns the value of attribute content_height_mm.
8 9 10 |
# File 'lib/nti_receipt_builder/render_result.rb', line 8 def content_height_mm @content_height_mm end |
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
8 9 10 |
# File 'lib/nti_receipt_builder/render_result.rb', line 8 def elements @elements end |
Instance Method Details
#overflow? ⇒ Boolean
16 |
# File 'lib/nti_receipt_builder/render_result.rb', line 16 def overflow? = @overflow |