Module: RubyRemoteConfig::Repository
- Included in:
- FileRepository, GcpStorageRepository, WebRepository
- Defined in:
- lib/repository.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#lock ⇒ Object
readonly
Returns the value of attribute lock.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#get_data(config_name) ⇒ Object
GetData returns the configuration data as a map of configuration names to their respective models.
- #get_name ⇒ Object
- #initialize(name:) ⇒ Object
- #refresh ⇒ Object
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/repository.rb', line 5 def data @data end |
#lock ⇒ Object (readonly)
Returns the value of attribute lock.
5 6 7 |
# File 'lib/repository.rb', line 5 def lock @lock end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/repository.rb', line 5 def name @name end |
Instance Method Details
#get_data(config_name) ⇒ Object
GetData returns the configuration data as a map of configuration names to their respective models.
18 19 20 21 22 23 |
# File 'lib/repository.rb', line 18 def get_data(config_name) @lock.synchronize do config = @data[config_name] return config end end |
#get_name ⇒ Object
13 14 15 |
# File 'lib/repository.rb', line 13 def get_name @name end |
#initialize(name:) ⇒ Object
7 8 9 10 11 |
# File 'lib/repository.rb', line 7 def initialize(name:) @name = name @data = {} @lock = Mutex.new end |
#refresh ⇒ Object
25 26 27 |
# File 'lib/repository.rb', line 25 def refresh raise NotImplementedError, 'Method not implemented' end |