Module: SimpleSpreadsheets::Rendering
- Included in:
- Document, Document::Row, Document::Row::Cell
- Defined in:
- lib/simple_spreadsheets/rendering.rb
Instance Method Summary collapse
Instance Method Details
#render ⇒ Object
3 4 5 |
# File 'lib/simple_spreadsheets/rendering.rb', line 3 def render ERB.new(template).result(binding) end |
#template ⇒ Object
7 8 9 |
# File 'lib/simple_spreadsheets/rendering.rb', line 7 def template File.read(File.("../templates/#{template_file}.xml.erb", __FILE__)) end |
#template_file ⇒ Object
11 12 13 |
# File 'lib/simple_spreadsheets/rendering.rb', line 11 def template_file self.class.name.demodulize.downcase end |