Class: ODDB::FiPDF::OrphanRule
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#pagebreak ⇒ Object
readonly
Returns the value of attribute pagebreak.
Attributes inherited from Rule
Instance Method Summary collapse
Methods inherited from Rule
Constructor Details
This class inherits a constructor from ODDB::FiPDF::Rule
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
26 27 28 |
# File 'ext/fipdf/src/rules.rb', line 26 def lines @lines end |
#pagebreak ⇒ Object (readonly)
Returns the value of attribute pagebreak.
26 27 28 |
# File 'ext/fipdf/src/rules.rb', line 26 def pagebreak @pagebreak end |
Instance Method Details
#fulfilled? ⇒ Boolean
27 28 29 |
# File 'ext/fipdf/src/rules.rb', line 27 def fulfilled? (@pagebreak == 0) || (@lines < 2) || (@pagebreak > 1) end |
#notify(event) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'ext/fipdf/src/rules.rb', line 30 def notify(event) case event when :add_text_wrap @lines += 1 when :ez_new_page @pagebreak = @lines unless @pagebreak > 0 end end |