Class: Gotenberg::Compiler

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

Constant Summary collapse

CONTEXT_TAG_REGEX =
/(<!-- GOTENBERG-CONTEXT-TAG (.+) -->)/.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Compiler

Returns a new instance of Compiler.



12
13
14
# File 'lib/gotenberg/compiler.rb', line 12

def initialize html
  @html = html
end

Instance Attribute Details

#htmlObject

Returns the value of attribute html.



10
11
12
# File 'lib/gotenberg/compiler.rb', line 10

def html
  @html
end

Instance Method Details

#assetsObject



20
21
22
# File 'lib/gotenberg/compiler.rb', line 20

def assets
  @assets ||= []
end

#bodyObject



16
17
18
# File 'lib/gotenberg/compiler.rb', line 16

def body
  @body ||= compile_body(html)
end