Class: Lennarb::Config

Inherits:
SuperConfig::Base
  • Object
show all
Defined in:
lib/lennarb/config.rb

Overview

The configuration for the application. It uses SuperConfig to define the configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

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?, **options)
  self.stderr_output = if silent
    nil
  else
    $stderr
  end

  @app = app
  block = proc { true }
  super(**options, &block)
  apply_defaults_settings
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



8
9
10
# File 'lib/lennarb/config.rb', line 8

def app
  @app
end

#stderr_outputObject

Returns the value of attribute stderr_output.



9
10
11
# File 'lib/lennarb/config.rb', line 9

def stderr_output
  @stderr_output
end