Class: Repofetch::Env
- Inherits:
-
Object
- Object
- Repofetch::Env
- Defined in:
- lib/repofetch/env.rb
Overview
Environment variable manager. Basically a wrapper around dotenv.
Constant Summary collapse
- DOTENV_NAMES =
['repofetch.env', '.repofetch.env'].freeze
Class Method Summary collapse
Class Method Details
.dotenv_paths ⇒ Object
14 15 16 |
# File 'lib/repofetch/env.rb', line 14 def self.dotenv_paths DOTENV_NAMES.map { |name| File.(name, Dir.home) } end |
.load ⇒ Object
10 11 12 |
# File 'lib/repofetch/env.rb', line 10 def self.load dotenv_paths.each { |dotenv| Dotenv.load(dotenv) } end |