class Report

Public Class Methods

new(page, data = {}) click to toggle source
# File lib/rubbyReport.rb, line 36
def initialize(page, data = {})
  @data = data
  @page = page
  file = File.join(File.dirname(__FILE__), "./templates/#{page}.html.erb")
  @template = File.read(file)
end

Public Instance Methods

render() click to toggle source
# File lib/rubbyReport.rb, line 43
def render
  ERB.new(@template).result(binding)
end