Class: ConfigCat::LocalFileDataSource
- Inherits:
-
OverrideDataSource
- Object
- OverrideDataSource
- ConfigCat::LocalFileDataSource
- Defined in:
- lib/configcat/localfiledatasource.rb
Instance Method Summary collapse
- #get_overrides ⇒ Object
-
#initialize(file_path, override_behaviour, log) ⇒ LocalFileDataSource
constructor
A new instance of LocalFileDataSource.
Methods inherited from OverrideDataSource
Constructor Details
#initialize(file_path, override_behaviour, log) ⇒ LocalFileDataSource
Returns a new instance of LocalFileDataSource.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/configcat/localfiledatasource.rb', line 18 def initialize(file_path, override_behaviour, log) super(override_behaviour) @log = log if !File.exists?(file_path) @log.error("The file '%s' does not exists." % file_path) end @_file_path = file_path @_settings = nil @_cached_file_stamp = 0 end |
Instance Method Details
#get_overrides ⇒ Object
29 30 31 32 |
# File 'lib/configcat/localfiledatasource.rb', line 29 def get_overrides reload_file_content() return @_settings end |