Module: ArticleJSON::Export::Common::HTML::Elements::Base
- Included in:
- AMP::Elements::Base, HTML::Elements::Base
- Defined in:
- lib/article_json/export/common/html/elements/base.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Extend ‘base` class with `ClassMethods` upon inclusion.
Instance Method Summary collapse
-
#export ⇒ Nokogiri::XML::NodeSet
Export a HTML node out of the given element Dynamically looks up the right export-element-class, instantiates it and then calls the #build method.
- #initialize(element) ⇒ Object
Class Method Details
.included(base) ⇒ Object
Extend ‘base` class with `ClassMethods` upon inclusion
8 9 10 |
# File 'lib/article_json/export/common/html/elements/base.rb', line 8 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#export ⇒ Nokogiri::XML::NodeSet
Export a HTML node out of the given element Dynamically looks up the right export-element-class, instantiates it and then calls the #build method.
21 22 23 |
# File 'lib/article_json/export/common/html/elements/base.rb', line 21 def export exporter.export unless exporter.nil? end |
#initialize(element) ⇒ Object
13 14 15 |
# File 'lib/article_json/export/common/html/elements/base.rb', line 13 def initialize(element) @element = element end |