Class: EmbeddableContent::Tex::BaseRenderer
- Inherits:
-
Object
- Object
- EmbeddableContent::Tex::BaseRenderer
- Defined in:
- app/services/embeddable_content/tex/base_renderer.rb
Direct Known Subclasses
CanvasRenderer, MathjaxRenderer, MmlRenderer, SchoologyStringRenderer, SvgRenderer
Constant Summary collapse
- RENDER_TEX_JS_PATH =
Pathname.new('lib').join 'tasks/render_tex.js'
Instance Attribute Summary collapse
-
#html ⇒ Object
readonly
Returns the value of attribute html.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(html) ⇒ BaseRenderer
constructor
A new instance of BaseRenderer.
- #render ⇒ Object
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
#html ⇒ Object (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 |
#status ⇒ Object (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 |
#stderr ⇒ Object (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 |
#stdout ⇒ Object (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
#render ⇒ Object
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 |