Class: Caracal::Core::Models::PageBreakModel
- Defined in:
- lib/caracal/core/models/page_break_model.rb
Overview
This class encapsulates the logic needed to store and manipulate page break data.
The :wrap option is not described in the project’s README because it exists purely as an internal Caracal concern. Page breaks at the document level must be wrapped in a paragraph node; page breaks within paragraph-like container simply add a run. There’s no need to trouble end users with this issue.
Instance Attribute Summary collapse
-
#page_break_wrap ⇒ Object
readonly
accessors.
Instance Method Summary collapse
-
#initialize(options = {}, &block) ⇒ PageBreakModel
constructor
initialization.
-
#wrap(value) ⇒ Object
SETTERS ==============================.
Methods inherited from BaseModel
Constructor Details
#initialize(options = {}, &block) ⇒ PageBreakModel
initialization
30 31 32 33 34 |
# File 'lib/caracal/core/models/page_break_model.rb', line 30 def initialize(={}, &block) @page_break_wrap = DEFAULT_PAGE_BREAK_WRAP super , &block end |
Instance Attribute Details
#page_break_wrap ⇒ Object (readonly)
accessors
27 28 29 |
# File 'lib/caracal/core/models/page_break_model.rb', line 27 def page_break_wrap @page_break_wrap end |
Instance Method Details
#wrap(value) ⇒ Object
SETTERS ==============================
43 44 45 |
# File 'lib/caracal/core/models/page_break_model.rb', line 43 def wrap(value) @page_break_wrap = !!value end |