Class: JAPR::JavaScriptTagTemplate

Inherits:
Template
  • Object
show all
Includes:
TemplateHelper
Defined in:
lib/japr/templates/javascript_tag_template.rb

Overview

Default output for JavaScript assets

Class Method Summary collapse

Instance Method Summary collapse

Methods included from TemplateHelper

#output_path, #root_path?

Methods inherited from Template

#initialize, klass

Methods included from SubclassTracking

#inherited, #subclasses

Constructor Details

This class inherits a constructor from JAPR::Template

Class Method Details

.filetypeObject



6
7
8
# File 'lib/japr/templates/javascript_tag_template.rb', line 6

def self.filetype
  '.js'
end

.priorityObject



10
11
12
# File 'lib/japr/templates/javascript_tag_template.rb', line 10

def self.priority
  -1
end

Instance Method Details

#htmlObject



14
15
16
17
# File 'lib/japr/templates/javascript_tag_template.rb', line 14

def html
  "<script src='#{output_path}/#{@filename}' " \
    "type='text/javascript'></script>"
end