Class: Simpacker::Configuration
- Inherits:
-
Object
- Object
- Simpacker::Configuration
- Defined in:
- lib/simpacker/configuration.rb
Instance Attribute Summary collapse
-
#config_path ⇒ Object
Returns the value of attribute config_path.
-
#env ⇒ Object
Returns the value of attribute env.
-
#root_path ⇒ Object
Returns the value of attribute root_path.
Instance Method Summary collapse
- #cache_manifest? ⇒ Boolean
-
#initialize(root_path:) ⇒ Configuration
constructor
A new instance of Configuration.
- #manifest_path ⇒ Object
Constructor Details
#initialize(root_path:) ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/simpacker/configuration.rb', line 7 def initialize(root_path:) @root_path = root_path @config_path = @root_path.join("config/simpacker.yml") @env = Rails.env end |
Instance Attribute Details
#config_path ⇒ Object
Returns the value of attribute config_path.
5 6 7 |
# File 'lib/simpacker/configuration.rb', line 5 def config_path @config_path end |
#env ⇒ Object
Returns the value of attribute env.
5 6 7 |
# File 'lib/simpacker/configuration.rb', line 5 def env @env end |
#root_path ⇒ Object
Returns the value of attribute root_path.
5 6 7 |
# File 'lib/simpacker/configuration.rb', line 5 def root_path @root_path end |
Instance Method Details
#cache_manifest? ⇒ Boolean
17 18 19 |
# File 'lib/simpacker/configuration.rb', line 17 def cache_manifest? data.fetch("cache_manifest") end |
#manifest_path ⇒ Object
13 14 15 |
# File 'lib/simpacker/configuration.rb', line 13 def manifest_path root_path.join(data.fetch("manifest_path")) end |