Class: Octopress::Ink::Assets::Javascript
- Inherits:
-
Asset
- Object
- Asset
- Octopress::Ink::Assets::Javascript
show all
- Defined in:
- lib/octopress-ink/assets/javascript.rb
Constant Summary
Constants inherited
from Asset
Asset::FRONT_MATTER
Instance Attribute Summary
Attributes inherited from Asset
#base, #dir, #exists, #file, #plugin, #replacement, #root
Instance Method Summary
collapse
Methods inherited from Asset
#asset_info, #content, #copy, #data, #disable, #disabled?, #ext, #filename, #info, #initialize, #is_disabled, #path, #payload, #read, #remove_jekyll_asset, #replaced?
Instance Method Details
#add ⇒ Object
13
14
15
16
|
# File 'lib/octopress-ink/assets/javascript.rb', line 13
def add
Plugins.add_js_tag tag
super
end
|
#destination ⇒ Object
18
19
20
|
# File 'lib/octopress-ink/assets/javascript.rb', line 18
def destination
File.join(base, plugin.slug, file)
end
|
#tag ⇒ Object
5
6
7
|
# File 'lib/octopress-ink/assets/javascript.rb', line 5
def tag
%Q{<script src="#{tag_path}"></script>}
end
|
#tag_path ⇒ Object
9
10
11
|
# File 'lib/octopress-ink/assets/javascript.rb', line 9
def tag_path
Filters.expand_url(File.join(dir, file))
end
|