Class: Iev::Config
- Inherits:
-
Object
- Object
- Iev::Config
- 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
-
#cache_dir ⇒ Object
Returns the value of attribute cache_dir.
-
#data_path ⇒ Object
Returns the value of attribute data_path.
-
#remote_base_url ⇒ Object
Returns the value of attribute remote_base_url.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_dir ⇒ Object
Returns the value of attribute cache_dir.
9 10 11 |
# File 'lib/iev/config.rb', line 9 def cache_dir @cache_dir end |
#data_path ⇒ Object
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_url ⇒ Object
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 |