Class: Dry::System::Plugins::Env
- Inherits:
-
Module
- Object
- Module
- Dry::System::Plugins::Env
- Defined in:
- lib/dry/system/plugins/env.rb
Constant Summary collapse
- DEFAULT_INFERRER =
-> { :development }
Instance Attribute Summary collapse
- #options ⇒ Object readonly
Instance Method Summary collapse
- #extended(system) ⇒ Object private
- #inferrer ⇒ Object
-
#initialize(**options) ⇒ Env
constructor
private
A new instance of Env.
Constructor Details
#initialize(**options) ⇒ Env
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Env.
13 14 15 16 |
# File 'lib/dry/system/plugins/env.rb', line 13 def initialize(**) @options = super() end |
Instance Attribute Details
#options ⇒ Object (readonly)
10 11 12 |
# File 'lib/dry/system/plugins/env.rb', line 10 def @options end |
Instance Method Details
#extended(system) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 |
# File 'lib/dry/system/plugins/env.rb', line 23 def extended(system) system.setting :env, default: inferrer.(), reader: true super end |
#inferrer ⇒ Object
18 19 20 |
# File 'lib/dry/system/plugins/env.rb', line 18 def inferrer .fetch(:inferrer, DEFAULT_INFERRER) end |