Class: ODDB::FiPDF::WidowRule
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.
40 41 42 |
# File 'ext/fipdf/src/rules.rb', line 40 def lines @lines end |
#pagebreak ⇒ Object (readonly)
Returns the value of attribute pagebreak.
40 41 42 |
# File 'ext/fipdf/src/rules.rb', line 40 def pagebreak @pagebreak end |
Instance Method Details
#fulfilled? ⇒ Boolean
41 42 43 |
# File 'ext/fipdf/src/rules.rb', line 41 def fulfilled? !((@lines - @pagebreak) == 1 && @pagebreak != 0) end |
#notify(event) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'ext/fipdf/src/rules.rb', line 44 def notify(event) case event when :add_text_wrap @lines += 1 when :ez_new_page @pagebreak = @lines end end |