Class: Kernai::Config
- Inherits:
-
Object
- Object
- Kernai::Config
- Defined in:
- lib/kernai/config.rb
Instance Attribute Summary collapse
-
#allowed_skills ⇒ Object
Returns the value of attribute allowed_skills.
- #config_resolver ⇒ Object
-
#credential_resolver ⇒ Object
Lazy defaults so ‘Kernai::Config` can be required before the resolver classes, and so hosts can override either one without touching the other.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#default_provider ⇒ Object
Returns the value of attribute default_provider.
- #logger ⇒ Object
-
#recorder ⇒ Object
Returns the value of attribute recorder.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 15 |
# File 'lib/kernai/config.rb', line 7 def initialize @debug = false @default_provider = nil @allowed_skills = nil @logger = nil @recorder = nil @credential_resolver = nil @config_resolver = nil end |
Instance Attribute Details
#allowed_skills ⇒ Object
Returns the value of attribute allowed_skills.
5 6 7 |
# File 'lib/kernai/config.rb', line 5 def allowed_skills @allowed_skills end |
#config_resolver ⇒ Object
29 30 31 |
# File 'lib/kernai/config.rb', line 29 def config_resolver @config_resolver ||= Kernai::EnvConfigResolver.new end |
#credential_resolver ⇒ Object
Lazy defaults so ‘Kernai::Config` can be required before the resolver classes, and so hosts can override either one without touching the other. ENV-backed defaults keep kernai usable as a standalone gem.
25 26 27 |
# File 'lib/kernai/config.rb', line 25 def credential_resolver @credential_resolver ||= Kernai::EnvResolver.new end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/kernai/config.rb', line 5 def debug @debug end |
#default_provider ⇒ Object
Returns the value of attribute default_provider.
5 6 7 |
# File 'lib/kernai/config.rb', line 5 def default_provider @default_provider end |
#logger ⇒ Object
17 18 19 |
# File 'lib/kernai/config.rb', line 17 def logger @logger ||= Kernai::Logger.new end |
#recorder ⇒ Object
Returns the value of attribute recorder.
5 6 7 |
# File 'lib/kernai/config.rb', line 5 def recorder @recorder end |