class Volt::BaseIndexRenderer

Public Class Methods

new(volt_app, manifest) click to toggle source
# File lib/volt/cli/base_index_renderer.rb, line 6
def initialize(volt_app, manifest)
  @volt_app = volt_app
  @manifest = manifest
end

Public Instance Methods

css_tags() click to toggle source
# File lib/volt/cli/base_index_renderer.rb, line 23
def css_tags
  "<link href=\"#{@volt_app.app_url}/#{@manifest['assets']['main/app.css']}\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />"
end
html() click to toggle source
# File lib/volt/cli/base_index_renderer.rb, line 11
def html
  index_path = File.expand_path(File.join(Volt.root, 'config/base/index.html'))
  html       = File.read(index_path)

  ERB.new(html, nil, '-').result(binding)
end
javascript_tags() click to toggle source

When writing the index, we render the

# File lib/volt/cli/base_index_renderer.rb, line 19
def javascript_tags
  "<script src=\"#{@volt_app.app_url}/#{@manifest['assets']['main/app.js']}\"></script>"
end