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) ⇒ LocalFileDataSource
constructor
A new instance of LocalFileDataSource.
Methods inherited from OverrideDataSource
Constructor Details
#initialize(file_path, override_behaviour) ⇒ LocalFileDataSource
Returns a new instance of LocalFileDataSource.
7 8 9 10 11 12 13 14 15 |
# File 'lib/configcat/localfiledatasource.rb', line 7 def initialize(file_path, override_behaviour) super(override_behaviour) if File.exists?(file_path) ConfigCat.logger.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
17 18 19 20 |
# File 'lib/configcat/localfiledatasource.rb', line 17 def get_overrides() reload_file_content() return @_settings end |