class Troo::Template
Attributes
object[R]
path[R]
Public Class Methods
new(object, path)
click to toggle source
@param [] @param [] @return []
# File lib/troo/presentation/template.rb, line 17 def initialize(object, path) @object, @path = object, path end
parse(object, path)
click to toggle source
@param [] @param [] @return []
# File lib/troo/presentation/template.rb, line 9 def parse(object, path) new(object, path).parse end
Public Instance Methods
parse()
click to toggle source
@return []
# File lib/troo/presentation/template.rb, line 22 def parse ERB.new(load, nil, '-').result(binding) end
Private Instance Methods
load()
click to toggle source
# File lib/troo/presentation/template.rb, line 30 def load File.read(File.dirname(__FILE__) + path) end