Class: Simpacker::Context
- Inherits:
-
Object
- Object
- Simpacker::Context
- Defined in:
- lib/simpacker/context.rb
Defined Under Namespace
Classes: InvalidConfigurationError
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#manifest ⇒ Object
readonly
Returns the value of attribute manifest.
Instance Method Summary collapse
-
#initialize(root_path: Rails.root, env: Rails.env) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(root_path: Rails.root, env: Rails.env) ⇒ Context
Returns a new instance of Context.
9 10 11 12 13 |
# File 'lib/simpacker/context.rb', line 9 def initialize(root_path: Rails.root, env: Rails.env) config = load_config_file(root_path, env) @config = Simpacker::Configuration.new(**config) @manifest = Simpacker::Manifest.new(@config) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/simpacker/context.rb', line 7 def config @config end |
#manifest ⇒ Object (readonly)
Returns the value of attribute manifest.
7 8 9 |
# File 'lib/simpacker/context.rb', line 7 def manifest @manifest end |