Class: ConsulApplicationSettings::Providers::LocalStorage

Inherits:
Abstract
  • Object
show all
Defined in:
lib/consul_application_settings/providers/local_storage.rb

Overview

Provides access to settings stored in file system with support of base and local files

Instance Method Summary collapse

Constructor Details

#initialize(base_path, config) ⇒ LocalStorage

Returns a new instance of LocalStorage.



7
8
9
10
# File 'lib/consul_application_settings/providers/local_storage.rb', line 7

def initialize(base_path, config)
  super
  @data = load
end

Instance Method Details

#get(path) ⇒ Object



12
13
14
# File 'lib/consul_application_settings/providers/local_storage.rb', line 12

def get(path)
  get_value_from_hash(absolute_key_path(path), @data)
end