3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/hooks/helpers/ActionView.rb', line 3
def source
if (self.filename.include?("oil"))
require 'LayoutInterpreter'
open(self.filename) {|f| @contents = f.read }
if (@view)
dsl = "product \"#{@view.productInfo[:product]}\"\n#{@view.navigationSteps}\n"+@contents.to_s
else
dsl = "product \"Retailer\"\nnavigation [:QNBRiskDataCollect,:QuoteSearch,:PolicySearch,:CancelConfirm]\n"+@contents.to_s
end
erb = "\t<% widgetROOT=\"#{WIDGET_ROOT2}\" %>\n"
erb << "\t<% teaserROOT=\"#{TEASER_ROOT}\" %>\n"
erb << LayoutInterpreter.execute(dsl)
source ||= erb
else
source ||= File.read(self.filename)
end
source
end
|