Class: WebpackerUploader::Configuration
- Inherits:
-
Object
- Object
- WebpackerUploader::Configuration
- Defined in:
- lib/webpacker_uploader/configuration.rb
Overview
This is the class which holds the configuration options.
Options are set and retrieved using WebpackerUploader.config
and WebpackerUploader.configure
.
Instance Attribute Summary collapse
-
#ignored_extensions ⇒ Array
The file extentions ignored by the uploader.
-
#log_output ⇒ Boolean
(also: #log_output?)
Whether or not to log operations.
-
#logger ⇒ ActiveSupport::Logger
The logger to use.
-
#public_manifest_path ⇒ Pathname
The path to manifest.json, defaults to Webpacker public manifest path.
-
#public_path ⇒ Pathname
The public root path, defaults to Webpacker public root path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
28 29 30 31 32 33 34 |
# File 'lib/webpacker_uploader/configuration.rb', line 28 def initialize @ignored_extensions = [] @logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT)) @log_output = true @public_manifest_path = ::Webpacker.config.public_manifest_path @public_path = ::Webpacker.config.public_path end |
Instance Attribute Details
#ignored_extensions ⇒ Array
Returns the file extentions ignored by the uploader.
12 13 14 |
# File 'lib/webpacker_uploader/configuration.rb', line 12 def ignored_extensions @ignored_extensions end |
#log_output ⇒ Boolean Also known as: log_output?
Returns whether or not to log operations.
18 19 20 |
# File 'lib/webpacker_uploader/configuration.rb', line 18 def log_output @log_output end |
#logger ⇒ ActiveSupport::Logger
Returns the logger to use.
15 16 17 |
# File 'lib/webpacker_uploader/configuration.rb', line 15 def logger @logger end |
#public_manifest_path ⇒ Pathname
Returns the path to manifest.json, defaults to Webpacker public manifest path.
21 22 23 |
# File 'lib/webpacker_uploader/configuration.rb', line 21 def public_manifest_path @public_manifest_path end |
#public_path ⇒ Pathname
Returns the public root path, defaults to Webpacker public root path.
24 25 26 |
# File 'lib/webpacker_uploader/configuration.rb', line 24 def public_path @public_path end |