Class: CassetteExplorer::Template

Inherits:
OpenStruct
  • Object
show all
Includes:
ERB::Util
Defined in:
lib/cassette_explorer/template.rb

Instance Method Summary collapse

Instance Method Details

#page_path(file, page) ⇒ Object



10
11
12
# File 'lib/cassette_explorer/template.rb', line 10

def page_path(file, page)
  "?file=#{u file}&url=#{u page.url}"
end

#render(template_file) ⇒ Object



5
6
7
8
# File 'lib/cassette_explorer/template.rb', line 5

def render(template_file)
  template = File.read template_file
  ERB.new(template).result(binding)
end