Class: ViewAssets::JavascriptAssets

Inherits:
AssetsFinder show all
Defined in:
lib/view_assets/js_assets.rb

Overview

TODO add rspec examples

Instance Attribute Summary

Attributes inherited from AssetsFinder

#action_name, #controller_name, #root

Instance Method Summary collapse

Methods inherited from AssetsFinder

#action_assets, #all, #all_assets, #controller_assets, #full, #initialize, #retrieve, #retrieved?, #verify

Constructor Details

This class inherits a constructor from ViewAssets::AssetsFinder

Instance Method Details

#asset_extensionObject



9
10
11
# File 'lib/view_assets/js_assets.rb', line 9

def asset_extension
  'js'
end

#asset_typeObject



13
14
15
# File 'lib/view_assets/js_assets.rb', line 13

def asset_type
  'javascript'
end

#assets_pathObject



4
5
6
7
# File 'lib/view_assets/js_assets.rb', line 4

def assets_path
  # 'assets/javascripts'
  'javascripts'
end

#tag(js_src) ⇒ Object



17
18
19
# File 'lib/view_assets/js_assets.rb', line 17

def tag(js_src)
  "<script src='#{js_src}'></script>"
end