module SimpleSpreadsheets::Rendering

Public Instance Methods

render() click to toggle source
# File lib/simple_spreadsheets/rendering.rb, line 3
def render
  ERB.new(template).result(binding)
end
template() click to toggle source
# File lib/simple_spreadsheets/rendering.rb, line 7
def template
  File.read(File.expand_path("../templates/#{template_file}.xml.erb", __FILE__))
end
template_file() click to toggle source
# File lib/simple_spreadsheets/rendering.rb, line 11
def template_file
  self.class.name.demodulize.downcase
end