Class: React::Rails::HotLoader::AssetPath
- Inherits:
-
Object
- Object
- React::Rails::HotLoader::AssetPath
- Defined in:
- lib/hot_loader/asset_path.rb
Overview
We want to include different files in dev/prod. The production (dummy) file is empty!
Constant Summary collapse
- GEM_LIB_PATH =
Pathname.new('../../').(__FILE__)
Instance Attribute Summary collapse
-
#to_s ⇒ Object
readonly
Returns the value of attribute to_s.
Instance Method Summary collapse
-
#initialize(dummy: false) ⇒ AssetPath
constructor
A new instance of AssetPath.
Constructor Details
#initialize(dummy: false) ⇒ AssetPath
Returns a new instance of AssetPath.
11 12 13 14 |
# File 'lib/hot_loader/asset_path.rb', line 11 def initialize(dummy: false) asset_path = dummy ? "assets/dummy": "assets" @to_s = File.join(GEM_LIB_PATH, asset_path) end |
Instance Attribute Details
#to_s ⇒ Object (readonly)
Returns the value of attribute to_s.
9 10 11 |
# File 'lib/hot_loader/asset_path.rb', line 9 def to_s @to_s end |