Class: Repofetch::Env

Inherits:
Object
  • Object
show all
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_pathsObject



14
15
16
# File 'lib/repofetch/env.rb', line 14

def self.dotenv_paths
  DOTENV_NAMES.map { |name| File.expand_path(name, Dir.home) }
end

.loadObject



10
11
12
# File 'lib/repofetch/env.rb', line 10

def self.load
  dotenv_paths.each { |dotenv| Dotenv.load(dotenv) }
end