Class: SportDB::Template
- Inherits:
-
Object
- Object
- SportDB::Template
- Defined in:
- lib/sportdb/templater.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ Template
constructor
A new instance of Template.
- #render(binding) ⇒ Object
Constructor Details
#initialize(path) ⇒ Template
Returns a new instance of Template.
5 6 7 |
# File 'lib/sportdb/templater.rb', line 5 def initialize( path ) @path = path end |
Instance Method Details
#render(binding) ⇒ Object
9 10 11 12 |
# File 'lib/sportdb/templater.rb', line 9 def render( binding ) ## '<>' means omit newline for lines starting with <% and ending in %> ERB.new( load_template(), 0, '<>' ).result( binding ) end |