Class: Tinypacker::Instance

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_path: Rails.root, env: Rails.env) ⇒ Instance

Returns a new instance of Instance.



43
44
45
46
47
48
# File 'lib/tinypacker.rb', line 43

def initialize(root_path: Rails.root, env: Rails.env)
  @root_path = root_path
  configuration = Tinypacker::Configuration.new(root_path: root_path, env: env)
  @manifest_path = configuration.manifest_path
  @manifest = Tinypacker::Manifest.new(configuration)
end

Instance Attribute Details

#manifestObject (readonly)

Returns the value of attribute manifest.



41
42
43
# File 'lib/tinypacker.rb', line 41

def manifest
  @manifest
end

#manifest_pathObject (readonly)

Returns the value of attribute manifest_path.



41
42
43
# File 'lib/tinypacker.rb', line 41

def manifest_path
  @manifest_path
end

#root_pathObject (readonly)

Returns the value of attribute root_path.



41
42
43
# File 'lib/tinypacker.rb', line 41

def root_path
  @root_path
end