Class: Wifidiag::Config
- Inherits:
-
Object
- Object
- Wifidiag::Config
- Defined in:
- lib/wifidiag/config.rb
Instance Method Summary collapse
- #[](k) ⇒ Object
- #adapter ⇒ Object
- #collector ⇒ Object
- #dig(*args) ⇒ Object
- #fetch(*args) ⇒ Object
-
#initialize(hash) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(hash) ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/wifidiag/config.rb', line 5 def initialize(hash) @hash = hash end |
Instance Method Details
#[](k) ⇒ Object
9 10 11 |
# File 'lib/wifidiag/config.rb', line 9 def [](k) @hash[k] end |
#adapter ⇒ Object
21 22 23 |
# File 'lib/wifidiag/config.rb', line 21 def adapter @hash.fetch(:adapter) end |
#collector ⇒ Object
25 26 27 |
# File 'lib/wifidiag/config.rb', line 25 def collector @collector ||= Collector.new(adapter) end |
#dig(*args) ⇒ Object
17 18 19 |
# File 'lib/wifidiag/config.rb', line 17 def dig(*args) @hash.dig(*args) end |
#fetch(*args) ⇒ Object
13 14 15 |
# File 'lib/wifidiag/config.rb', line 13 def fetch(*args) @hash.fetch(*args) end |