Class: MIXTAPEEMBEDParser
- Defined in:
- lib/Parsers/MIXTAPEEMBEDParser.rb
Instance Attribute Summary collapse
-
#nextParser ⇒ Object
Returns the value of attribute nextParser.
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.
7 8 9 |
# File 'lib/Parsers/MIXTAPEEMBEDParser.rb', line 7 def nextParser @nextParser end |
Instance Method Details
#parse(paragraph) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/Parsers/MIXTAPEEMBEDParser.rb', line 8 def parse(paragraph) if paragraph.type == 'MIXTAPE_EMBED' if !paragraph.mixtapeMetadata.nil? && !paragraph.mixtapeMetadata.href.nil? "\n[#{paragraph.orgText}](#{paragraph.mixtapeMetadata.href})" else "\n#{paragraph.orgText}" end else if !nextParser.nil? nextParser.parse(paragraph) end end end |