Class: Markbridge::Parsers::HTML::Handlers::BaseHandler
- Inherits:
-
Object
- Object
- Markbridge::Parsers::HTML::Handlers::BaseHandler
- Defined in:
- lib/markbridge/parsers/html/handlers/base_handler.rb
Direct Known Subclasses
ImageHandler, ListHandler, ListItemHandler, QuoteHandler, RawHandler, SimpleHandler, TableCellHandler, TableHandler, TableRowHandler, UrlHandler
Instance Attribute Summary collapse
-
#element_class ⇒ Class
readonly
The element class created by this handler Subclasses must expose this via attr_reader :element_class.
Instance Method Summary collapse
-
#process(element:, parent:) ⇒ AST::Element?
Process a Nokogiri node and add it to the parent AST node Subclasses should override this method.
Instance Attribute Details
#element_class ⇒ Class (readonly)
The element class created by this handler Subclasses must expose this via attr_reader :element_class
21 22 23 |
# File 'lib/markbridge/parsers/html/handlers/base_handler.rb', line 21 def element_class @element_class end |
Instance Method Details
#process(element:, parent:) ⇒ AST::Element?
Process a Nokogiri node and add it to the parent AST node Subclasses should override this method
13 14 15 16 |
# File 'lib/markbridge/parsers/html/handlers/base_handler.rb', line 13 def process(element:, parent:) # Default: do nothing, subclasses override nil end |