Class: Iev::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/iev/config.rb

Constant Summary collapse

DEFAULT_REMOTE_BASE_URL =
"https://raw.githubusercontent.com/glossarist/glossarist-data-iev/main/concepts"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



11
12
13
14
15
# File 'lib/iev/config.rb', line 11

def initialize
  @data_path = ENV["IEV_DATA_PATH"]
  @cache_dir = ENV["IEV_CACHE_DIR"] || File.join(Dir.tmpdir, "iev-cache")
  @remote_base_url = DEFAULT_REMOTE_BASE_URL
end

Instance Attribute Details

#cache_dirObject

Returns the value of attribute cache_dir.



9
10
11
# File 'lib/iev/config.rb', line 9

def cache_dir
  @cache_dir
end

#data_pathObject

Returns the value of attribute data_path.



9
10
11
# File 'lib/iev/config.rb', line 9

def data_path
  @data_path
end

#remote_base_urlObject

Returns the value of attribute remote_base_url.



9
10
11
# File 'lib/iev/config.rb', line 9

def remote_base_url
  @remote_base_url
end