Class: Parade::JSTemplateGenerator

Inherits:
TemplateGenerator show all
Defined in:
lib/parade/helpers/template_generator.rb

Overview

Inline the specified javascript

Instance Method Summary collapse

Methods inherited from TemplateGenerator

#css, #css_template, #custom_css_files, #erb, #js, #js_template, #render, #theme_css

Instance Method Details

#contentObject



120
121
122
123
# File 'lib/parade/helpers/template_generator.rb', line 120

def content
  content_filepath = File.exists?(filepath) ? filepath : File.join(File.dirname(__FILE__), "..", "..", "public", "js", filepath)
  File.read content_filepath
end

#erb_template_fileObject



125
126
127
# File 'lib/parade/helpers/template_generator.rb', line 125

def erb_template_file
  File.join File.dirname(__FILE__), "..", "..", "views", "inline_js.erb"
end