Class: Wifidiag::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/wifidiag/config.rb

Instance Method Summary collapse

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

#adapterObject



21
22
23
# File 'lib/wifidiag/config.rb', line 21

def adapter
  @hash.fetch(:adapter)
end

#collectorObject



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