Class: Lennarb::Config
- Inherits:
-
SuperConfig::Base
- Object
- SuperConfig::Base
- Lennarb::Config
- Defined in:
- lib/lennarb/config.rb
Overview
The configuration for the application. It uses SuperConfig to define the configuration.
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#stderr_output ⇒ Object
Returns the value of attribute stderr_output.
Instance Method Summary collapse
-
#initialize(app = nil, silent: !ENV["LENNARB_SILENT_LOGS"].nil?,, **options) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(app = nil, silent: !ENV["LENNARB_SILENT_LOGS"].nil?,, **options) ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/lennarb/config.rb', line 11 def initialize(app = nil, silent: !ENV["LENNARB_SILENT_LOGS"].nil?, **) self.stderr_output = if silent nil else $stderr end @app = app block = proc { true } super(**, &block) apply_defaults_settings end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
8 9 10 |
# File 'lib/lennarb/config.rb', line 8 def app @app end |
#stderr_output ⇒ Object
Returns the value of attribute stderr_output.
9 10 11 |
# File 'lib/lennarb/config.rb', line 9 def stderr_output @stderr_output end |