Class: Hologram::CodeExampleRenderer::Example
- Inherits:
-
Struct
- Object
- Struct
- Hologram::CodeExampleRenderer::Example
- Defined in:
- lib/hologram/code_example_renderer/example.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
3 4 5 |
# File 'lib/hologram/code_example_renderer/example.rb', line 3 def code @code end |
Instance Method Details
#code_example ⇒ Object
8 9 10 |
# File 'lib/hologram/code_example_renderer/example.rb', line 8 def code_example formatter.format(lexer.lex(code)).strip end |
#get_binding ⇒ Object
12 13 14 |
# File 'lib/hologram/code_example_renderer/example.rb', line 12 def get_binding binding end |
#rendered_example ⇒ Object
4 5 6 |
# File 'lib/hologram/code_example_renderer/example.rb', line 4 def rendered_example code end |