Method: Bookmaker::Base.parse_layout
- Defined in:
- lib/bookmaker/base.rb
.parse_layout(contents) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/bookmaker/base.rb', line 89 def self.parse_layout(contents) template = File.new(template_path).read contents, toc = self.table_of_contents(contents) cfg = config.merge(:contents => contents, :toc => toc) env = OpenStruct.new(cfg) ERB.new(template).result env.instance_eval{binding} end |