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.
11 12 13 |
# File 'lib/dry/system/plugins/env.rb', line 11 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
8 9 10 |
# File 'lib/dry/system/plugins/env.rb', line 8 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.
20 21 22 23 |
# File 'lib/dry/system/plugins/env.rb', line 20 def extended(system) system.setting :env, inferrer.(), reader: true super end |
#inferrer ⇒ Object
15 16 17 |
# File 'lib/dry/system/plugins/env.rb', line 15 def inferrer .fetch(:inferrer, DEFAULT_INFERRER) end |