Class: ArticleJSON::Export::PlainText::Elements::Base

Inherits:
Object
  • Object
show all
Includes:
Common::Elements::Base
Defined in:
lib/article_json/export/plain_text/elements/base.rb

Direct Known Subclasses

Embed, Heading, Image, List, Paragraph, Quote, Text, TextBox

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Common::Elements::Base

included, #initialize

Class Method Details

.namespaceModule

Return the module namespace this class and its subclasses are nested in

Returns:

  • (Module)


22
23
24
# File 'lib/article_json/export/plain_text/elements/base.rb', line 22

def namespace
  ArticleJSON::Export::PlainText::Elements
end

Instance Method Details

#exportString

Export the given element. Dynamically looks up the right export-element-class, instantiates it and then calls the ‘#export` method. Defaults to an empty string, e.g. if no exporter is specified for the given type.

Returns:

  • (String)


14
15
16
# File 'lib/article_json/export/plain_text/elements/base.rb', line 14

def export
  super || ''
end