Class: Manifester::Configuration
- Inherits:
-
Object
- Object
- Manifester::Configuration
- Defined in:
- lib/manifester/configuration.rb
Instance Attribute Summary collapse
-
#cache_manifest ⇒ Object
readonly
Returns the value of attribute cache_manifest.
-
#fallback_to_webpacker ⇒ Object
readonly
Returns the value of attribute fallback_to_webpacker.
-
#public_output_dir ⇒ Object
readonly
Returns the value of attribute public_output_dir.
-
#public_root_dir ⇒ Object
readonly
Returns the value of attribute public_root_dir.
-
#root_path ⇒ Object
readonly
Returns the value of attribute root_path.
Instance Method Summary collapse
- #cache_manifest? ⇒ Boolean
- #fallback_to_webpacker? ⇒ Boolean
-
#initialize(root_path:, public_root_dir:, public_output_dir:, cache_manifest:, fallback_to_webpacker:) ⇒ Configuration
constructor
A new instance of Configuration.
- #public_manifest_path ⇒ Object
- #public_output_path ⇒ Object
- #public_path ⇒ Object
Constructor Details
#initialize(root_path:, public_root_dir:, public_output_dir:, cache_manifest:, fallback_to_webpacker:) ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 |
# File 'lib/manifester/configuration.rb', line 8 def initialize(root_path:, public_root_dir:, public_output_dir:, cache_manifest:, fallback_to_webpacker:) @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 |
Instance Attribute Details
#cache_manifest ⇒ Object (readonly)
Returns the value of attribute cache_manifest.
5 6 7 |
# File 'lib/manifester/configuration.rb', line 5 def cache_manifest @cache_manifest end |
#fallback_to_webpacker ⇒ Object (readonly)
Returns the value of attribute fallback_to_webpacker.
6 7 8 |
# File 'lib/manifester/configuration.rb', line 6 def fallback_to_webpacker @fallback_to_webpacker end |
#public_output_dir ⇒ Object (readonly)
Returns the value of attribute public_output_dir.
4 5 6 |
# File 'lib/manifester/configuration.rb', line 4 def public_output_dir @public_output_dir end |
#public_root_dir ⇒ Object (readonly)
Returns the value of attribute public_root_dir.
3 4 5 |
# File 'lib/manifester/configuration.rb', line 3 def public_root_dir @public_root_dir end |
#root_path ⇒ Object (readonly)
Returns the value of attribute root_path.
2 3 4 |
# File 'lib/manifester/configuration.rb', line 2 def root_path @root_path end |
Instance Method Details
#cache_manifest? ⇒ Boolean
28 29 30 |
# File 'lib/manifester/configuration.rb', line 28 def cache_manifest? @cache_manifest end |
#fallback_to_webpacker? ⇒ Boolean
32 33 34 |
# File 'lib/manifester/configuration.rb', line 32 def fallback_to_webpacker? fallback_to_webpacker.call end |
#public_manifest_path ⇒ Object
24 25 26 |
# File 'lib/manifester/configuration.rb', line 24 def public_manifest_path public_output_path.join("manifest.json") end |
#public_output_path ⇒ Object
20 21 22 |
# File 'lib/manifester/configuration.rb', line 20 def public_output_path public_path.join(@public_output_dir) end |
#public_path ⇒ Object
16 17 18 |
# File 'lib/manifester/configuration.rb', line 16 def public_path root_path.join(@public_root_dir) end |