Module: Exercism::Rb::Config

Defined in:
lib/exercism/rb/config.rb

Class Method Summary collapse

Class Method Details

.editorObject



20
21
22
# File 'lib/exercism/rb/config.rb', line 20

def editor
  ENV["XRB_EDITOR"] || ENV["VISUAL"] || ENV["EDITOR"]
end

.root(track_name = track) ⇒ Object



12
13
14
# File 'lib/exercism/rb/config.rb', line 12

def root(track_name = track)
  File.expand_path(ENV.fetch("XRB_ROOT", File.join(Dir.home, "exercism", track_name)))
end

.state_pathObject



16
17
18
# File 'lib/exercism/rb/config.rb', line 16

def state_path
  File.expand_path(ENV.fetch("XRB_STATE", File.join(Dir.home, ".local", "state", "exercism-rb", "state.toml")))
end

.trackObject



8
9
10
# File 'lib/exercism/rb/config.rb', line 8

def track
  ENV.fetch("XRB_TRACK", "ruby")
end