Class: Rmsgen::Titleizer
- Inherits:
-
Object
- Object
- Rmsgen::Titleizer
- Defined in:
- lib/rmsgen/titleizer.rb
Constant Summary collapse
- SPACE =
' '
- UNDERSCORE =
'_'
- TEMPLATE =
File.join(File.dirname(__FILE__), '..', 'templates', 'title.erb')
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(polnote, options = {}) ⇒ Titleizer
constructor
A new instance of Titleizer.
- #to_html ⇒ Object
Constructor Details
#initialize(polnote, options = {}) ⇒ Titleizer
Returns a new instance of Titleizer.
10 11 12 13 14 15 |
# File 'lib/rmsgen/titleizer.rb', line 10 def initialize(polnote, ={}) @title = [:title] @body = polnote.body @script = Script.new($stdout) run! end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
8 9 10 |
# File 'lib/rmsgen/titleizer.rb', line 8 def title @title end |
Instance Method Details
#to_html ⇒ Object
17 18 19 |
# File 'lib/rmsgen/titleizer.rb', line 17 def to_html ERB.new(File.read(TEMPLATE)).result(binding) end |