Method: Ditz::ErbHtml#initialize
- Defined in:
- lib/html.rb
#initialize(template_dir, template_name, links, mapping = {}) ⇒ ErbHtml
Returns a new instance of ErbHtml.
8 9 10 11 12 13 14 15 16 |
# File 'lib/html.rb', line 8 def initialize template_dir, template_name, links, mapping={} @template_name = template_name @template_dir = template_dir @links = links @mapping = mapping @@erbs ||= {} @@erbs[template_name] ||= ERB.new(IO.readlines(File.join(template_dir, "#{template_name}.rhtml")).join) end |