Class: Manifester::Instance
- Inherits:
-
Object
- Object
- Manifester::Instance
- Defined in:
- lib/manifester/instance.rb
Instance Attribute Summary collapse
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(root_path: Rails.root, public_root_dir: "public", public_output_dir: "packs", cache_manifest: false, fallback_to_webpacker: -> {}) ⇒ Instance
constructor
A new instance of Instance.
- #manifest ⇒ Object
Constructor Details
#initialize(root_path: Rails.root, public_root_dir: "public", public_output_dir: "packs", cache_manifest: false, fallback_to_webpacker: -> {}) ⇒ Instance
Returns a new instance of Instance.
6 7 8 |
# File 'lib/manifester/instance.rb', line 6 def initialize(root_path: Rails.root, public_root_dir: "public", public_output_dir: "packs", cache_manifest: false, fallback_to_webpacker: -> {}) @root_path, @public_root_dir, @public_output_dir, @cache_manifest, @fallback_to_webpacker = root_path, public_root_dir, public_output_dir, cache_manifest, fallback_to_webpacker end |
Instance Attribute Details
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
4 5 6 |
# File 'lib/manifester/instance.rb', line 4 def root_path @root_path end |
Instance Method Details
#config ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/manifester/instance.rb', line 10 def config @config ||= Manifester::Configuration.new( root_path: @root_path, public_root_dir: @public_root_dir, public_output_dir: @public_output_dir, cache_manifest: @cache_manifest, fallback_to_webpacker: @fallback_to_webpacker ) end |
#manifest ⇒ Object
20 21 22 |
# File 'lib/manifester/instance.rb', line 20 def manifest @manifest ||= Manifester::Manifest.new self end |