Class: Slippers::FileTemplate
- Defined in:
- lib/engine/file_template.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ FileTemplate
constructor
A new instance of FileTemplate.
- #template ⇒ Object
Methods inherited from Template
Constructor Details
#initialize(filename) ⇒ FileTemplate
Returns a new instance of FileTemplate.
3 4 5 |
# File 'lib/engine/file_template.rb', line 3 def initialize(filename) @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/engine/file_template.rb', line 6 def filename @filename end |
Instance Method Details
#template ⇒ Object
7 8 9 10 |
# File 'lib/engine/file_template.rb', line 7 def template() return @template if @template @template = File.read(@filename) end |