Class: ODDB::FiPDF::FachinfoRule
Instance Attribute Summary collapse
-
#pagebreak ⇒ Object
readonly
Returns the value of attribute pagebreak.
-
#paragraphs ⇒ Object
readonly
Returns the value of attribute paragraphs.
Attributes inherited from Rule
Instance Method Summary collapse
- #fulfilled? ⇒ Boolean
-
#initialize(*args) ⇒ FachinfoRule
constructor
A new instance of FachinfoRule.
- #notify(event) ⇒ Object
Constructor Details
#initialize(*args) ⇒ FachinfoRule
Returns a new instance of FachinfoRule.
55 56 57 58 59 |
# File 'ext/fipdf/src/rules.rb', line 55 def initialize(*args) super @paragraphs = 0 @pagebreak = -1 end |
Instance Attribute Details
#pagebreak ⇒ Object (readonly)
Returns the value of attribute pagebreak.
54 55 56 |
# File 'ext/fipdf/src/rules.rb', line 54 def pagebreak @pagebreak end |
#paragraphs ⇒ Object (readonly)
Returns the value of attribute paragraphs.
54 55 56 |
# File 'ext/fipdf/src/rules.rb', line 54 def paragraphs @paragraphs end |
Instance Method Details
#fulfilled? ⇒ Boolean
60 61 62 |
# File 'ext/fipdf/src/rules.rb', line 60 def fulfilled? @pagebreak != 0 end |
#notify(event) ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'ext/fipdf/src/rules.rb', line 63 def notify(event) case event when :write_paragraph @paragraphs += 1 when :ez_new_page @pagebreak = @paragraphs if @pagebreak < 0 end end |