Class: AsciiPress::Renderer::Rendering

Inherits:
Object
  • Object
show all
Defined in:
lib/ascii_press.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html, doc, data) ⇒ Rendering

Create a new AsciiPress::Renderer::Rendering object (intended to be used by Syncers like WordPressSyncer)



40
41
42
43
44
45
# File 'lib/ascii_press.rb', line 40

def initialize(html, doc, data)
  @html = html
  @doc = doc
  @data = data
  @title = doc.doctitle
end

Instance Attribute Details

#dataHash (readonly)

Returns The adoc file’s attributes standardized with symbol keys and string values.

Returns:

  • (Hash)

    The adoc file’s attributes standardized with symbol keys and string values



31
32
33
# File 'lib/ascii_press.rb', line 31

def data
  @data
end

#docAsciidoctor::Document (readonly)

Returns The document from the asciidoctor gem.

Returns:

  • (Asciidoctor::Document)

    The document from the asciidoctor gem



28
29
30
# File 'lib/ascii_press.rb', line 28

def doc
  @doc
end

#htmlString (readonly)

Returns The HTML resulting from the asciidoc.

Returns:

  • (String)

    The HTML resulting from the asciidoc



25
26
27
# File 'lib/ascii_press.rb', line 25

def html
  @html
end

#tagsArray <String>

Returns The tags which will be set in WordPress.

Returns:

  • (Array <String>)

    The tags which will be set in WordPress



34
35
36
# File 'lib/ascii_press.rb', line 34

def tags
  @tags
end

#titleString

Returns The title that will be used.

Returns:

  • (String)

    The title that will be used



37
38
39
# File 'lib/ascii_press.rb', line 37

def title
  @title
end