Class: EmbeddableContent::Tex::BaseRenderer

Inherits:
Object
  • Object
show all
Defined in:
app/services/embeddable_content/tex/base_renderer.rb

Constant Summary collapse

RENDER_TEX_JS_PATH =
Pathname.new('lib').join 'tasks/render_tex.js'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ BaseRenderer

Returns a new instance of BaseRenderer.



21
22
23
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 21

def initialize(html)
  @html = html
end

Instance Attribute Details

#htmlObject (readonly)

Returns the value of attribute html.



19
20
21
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 19

def html
  @html
end

#statusObject (readonly)

Returns the value of attribute status.



19
20
21
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 19

def status
  @status
end

#stderrObject (readonly)

Returns the value of attribute stderr.



19
20
21
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 19

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



19
20
21
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 19

def stdout
  @stdout
end

Instance Method Details

#renderObject



25
26
27
28
29
# File 'app/services/embeddable_content/tex/base_renderer.rb', line 25

def render
  return html unless rendering_required?

  run_script
end