class Cucumber::HTMLFormatter::AssetsLoader
Public Instance Methods
css()
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 8 def css read_asset('cucumber-html.css') end
script()
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 12 def script read_asset('cucumber-html.js') end
template()
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 4 def template read_asset('index.mustache.html') end
Private Instance Methods
assets_path()
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 22 def assets_path "#{html_formatter_path}/assets" end
html_formatter_path()
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 26 def html_formatter_path Gem.loaded_specs['cucumber-html-formatter'].full_gem_path rescue '.' end
read_asset(name)
click to toggle source
# File lib/cucumber/html_formatter/assets_loader.rb, line 18 def read_asset(name) File.read(File.join(assets_path, name)) end