Class: PParser
Instance Attribute Summary collapse
-
#nextParser ⇒ Object
Returns the value of attribute nextParser.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Parser
Constructor Details
This class inherits a constructor from Parser
Instance Attribute Details
#nextParser ⇒ Object
Returns the value of attribute nextParser.
5 6 7 |
# File 'lib/Parsers/PParser.rb', line 5 def nextParser @nextParser end |
Class Method Details
.getTypeString ⇒ Object
7 8 9 |
# File 'lib/Parsers/PParser.rb', line 7 def self.getTypeString() 'P' end |
Instance Method Details
#parse(paragraph) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/Parsers/PParser.rb', line 11 def parse(paragraph) if paragraph.type == PParser.getTypeString() "\n#{paragraph.text}" else if !nextParser.nil? nextParser.parse(paragraph) end end end |