Module: MKIt::ERBHelper
Instance Method Summary collapse
- #parse_model(template) ⇒ Object
- #parse_template(template, data = {}) ⇒ Object
- #read_template(template) ⇒ Object
Instance Method Details
#parse_model(template) ⇒ Object
16 17 18 |
# File 'lib/mkit/app/helpers/erb_helper.rb', line 16 def parse_model(template) ERB.new(read_template(template)) end |
#parse_template(template, data = {}) ⇒ Object
12 13 14 |
# File 'lib/mkit/app/helpers/erb_helper.rb', line 12 def parse_template(template, data = {}) ERB.new(read_template(template)).result_with_hash(data) end |