Class: Arrolio::Content::PageBreak
- Inherits:
-
Object
- Object
- Arrolio::Content::PageBreak
- Defined in:
- lib/arrolio/content/page_break.rb
Overview
An explicit page break in the content tree. Emitted by the
adapter when it encounters a
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(id: nil) ⇒ PageBreak
constructor
A new instance of PageBreak.
Constructor Details
#initialize(id: nil) ⇒ PageBreak
Returns a new instance of PageBreak.
12 13 14 15 |
# File 'lib/arrolio/content/page_break.rb', line 12 def initialize(id: nil) @id = id&.to_s freeze end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/arrolio/content/page_break.rb', line 10 def id @id end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
17 18 19 |
# File 'lib/arrolio/content/page_break.rb', line 17 def ==(other) other.is_a?(self.class) && id == other.id end |
#hash ⇒ Object
23 24 25 |
# File 'lib/arrolio/content/page_break.rb', line 23 def hash [self.class, id].hash end |