Class: Pwl::Presenter::Html
- Inherits:
-
Object
- Object
- Pwl::Presenter::Html
- Defined in:
- lib/pwl/presenter/html.rb
Constant Summary collapse
- DEFAULT_EXPORT_TEMPLATE =
File.join(File.dirname(__FILE__), *%w[.. .. .. templates export.html.erb])
Instance Attribute Summary collapse
-
#locker ⇒ Object
readonly
used by the ERB template.
Instance Method Summary collapse
-
#initialize(locker) ⇒ Html
constructor
A new instance of Html.
- #to_s ⇒ Object
Constructor Details
#initialize(locker) ⇒ Html
Returns a new instance of Html.
9 10 11 12 |
# File 'lib/pwl/presenter/html.rb', line 9 def initialize(locker) @locker = locker @template = ERB.new(File.read(DEFAULT_EXPORT_TEMPLATE)) end |
Instance Attribute Details
#locker ⇒ Object (readonly)
used by the ERB template
6 7 8 |
# File 'lib/pwl/presenter/html.rb', line 6 def locker @locker end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/pwl/presenter/html.rb', line 14 def to_s @template.result(binding) end |