Class: Crusoe::EntryTemplate
- Inherits:
-
Object
- Object
- Crusoe::EntryTemplate
- Defined in:
- lib/crusoe/entry_template.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Instance Method Summary collapse
-
#initialize(entry) ⇒ EntryTemplate
constructor
A new instance of EntryTemplate.
- #rendered_template_content ⇒ Object (also: #to_s)
Constructor Details
#initialize(entry) ⇒ EntryTemplate
Returns a new instance of EntryTemplate.
8 9 10 |
# File 'lib/crusoe/entry_template.rb', line 8 def initialize(entry) @entry = entry end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
6 7 8 |
# File 'lib/crusoe/entry_template.rb', line 6 def entry @entry end |
Instance Method Details
#rendered_template_content ⇒ Object Also known as: to_s
12 13 14 15 |
# File 'lib/crusoe/entry_template.rb', line 12 def rendered_template_content markdown = ERB.new(template_content) markdown.result(entry.binding) end |