Class: TrackList::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/track_list/environment.rb

Instance Method Summary collapse

Constructor Details

#initializeEnvironment

Returns a new instance of Environment.



3
4
5
6
7
8
9
# File 'lib/track_list/environment.rb', line 3

def initialize
  if ENV.has_value?("TRACKLIST_CONFIG")
    @config_path = ENV["TRACKLIST_CONFIG"]
  else
    @config_path = Dir.home() + '/.config/track_list/settings.yaml'
  end
end

Instance Method Details

#get_config_pathObject



11
12
13
# File 'lib/track_list/environment.rb', line 11

def get_config_path
  @config_path
end