Class: React::Rails::HotLoader::AssetPath

Inherits:
Object
  • Object
show all
Defined in:
lib/hot_loader/asset_path.rb

Constant Summary collapse

GEM_LIB_PATH =
Pathname.new('../../').expand_path(__FILE__)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dummy: false) ⇒ AssetPath

Returns a new instance of AssetPath.



9
10
11
12
# File 'lib/hot_loader/asset_path.rb', line 9

def initialize(dummy: false)
  asset_path = dummy ? "assets/dummy": "assets"
  @to_s = File.join(GEM_LIB_PATH, asset_path)
end

Instance Attribute Details

#to_sObject (readonly)

Returns the value of attribute to_s.



7
8
9
# File 'lib/hot_loader/asset_path.rb', line 7

def to_s
  @to_s
end