Module: Railspacker::Helper

Defined in:
lib/railspacker/helper.rb

Instance Method Summary collapse

Instance Method Details

#pack_path(name) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/railspacker/helper.rb', line 2

def pack_path(name)
  manifest = Railspacker.manifest.load

  if manifest.nil?
    raise "manifest.json not found."
  end

  if !manifest.key?(name)
    raise "Pack not found in manifest.json: #{name}"
  end
  
  [Railspacker.manifest.path_to, manifest[name]].join('/')
end