Class: Troy::EmbeddedRuby
- Inherits:
-
Object
- Object
- Troy::EmbeddedRuby
- Defined in:
- lib/troy/embedded_ruby.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
The template content.
-
#data ⇒ Object
readonly
The data that must be rendered within the Troy::Context object.
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(content, data) ⇒ EmbeddedRuby
constructor
A new instance of EmbeddedRuby.
- #render ⇒ Object
Constructor Details
#initialize(content, data) ⇒ EmbeddedRuby
Returns a new instance of EmbeddedRuby.
14 15 16 17 |
# File 'lib/troy/embedded_ruby.rb', line 14 def initialize(content, data) @content = content @data = data end |
Instance Attribute Details
#content ⇒ Object (readonly)
The template content.
7 8 9 |
# File 'lib/troy/embedded_ruby.rb', line 7 def content @content end |
#data ⇒ Object (readonly)
The data that must be rendered within the Troy::Context object.
12 13 14 |
# File 'lib/troy/embedded_ruby.rb', line 12 def data @data end |