lib/troo/presentation/template.rb in troo-0.0.7 vs lib/troo/presentation/template.rb in troo-0.0.8
- old
+ new
@@ -2,27 +2,28 @@
class Esc
extend Term::ANSIColor
end
class Template
+ include DecoratorHelpers
+
class << self
def parse(object, template_path)
new(object, template_path).parse
end
end
- include DecoratorHelpers
-
def initialize(object, template_path)
@object = object
@template_path = template_path
end
def parse
- ERB.new(load_template, nil, "-").result(binding)
+ ERB.new(load_template, nil, '-').result(binding)
end
private
+
attr_reader :object, :template_path
def load_template
File.read(File.dirname(__FILE__) + template_path)
end