Module: Trackman::Assets::BundledAsset
- Includes:
- Components::Hashable
- Defined in:
- lib/trackman/assets/bundled_asset.rb
Instance Method Summary collapse
Methods included from Components::Hashable
Instance Method Details
#data ⇒ Object
10 11 12 13 14 15 |
# File 'lib/trackman/assets/bundled_asset.rb', line 10 def data result = (@bundled ||= init_data) return super if result.nil? || result.length == 0 result end |
#env ⇒ Object
6 7 8 |
# File 'lib/trackman/assets/bundled_asset.rb', line 6 def env @@env ||= ::Rails.application.assets.index end |
#init_data ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/trackman/assets/bundled_asset.rb', line 17 def init_data begin return env[env.attributes_for(path.realpath).pathname].to_s rescue return nil end end |