Class: SettingsProvider

Inherits:
Object
  • Object
show all
Defined in:
app/core/settings.rb

Overview

The settings provider is responsible for reading the settings from the config file and providing them to clients

Instance Method Summary collapse

Constructor Details

#initialize(fs = File) ⇒ SettingsProvider

Returns a new instance of SettingsProvider.



23
24
25
# File 'app/core/settings.rb', line 23

def initialize(fs=File)
  @filesystem = fs
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id) ⇒ Object



27
28
29
# File 'app/core/settings.rb', line 27

def method_missing(method_id)
  load_confs[method_id.to_s].to_i
end

Instance Method Details

#active_reporter_idsObject



31
32
33
# File 'app/core/settings.rb', line 31

def active_reporter_ids
  load_confs.keys - ['package_size', 'update_interval']
end