Class: Simpacker::Context

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

Defined Under Namespace

Classes: InvalidConfigurationError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/simpacker/context.rb', line 7

def config
  @config
end

#manifestObject (readonly)

Returns the value of attribute manifest.



7
8
9
# File 'lib/simpacker/context.rb', line 7

def manifest
  @manifest
end