Module: Nocion::Config

Defined in:
lib/nocion/config.rb

Class Method Summary collapse

Class Method Details

.keyObject



9
10
11
# File 'lib/nocion/config.rb', line 9

def key
  @cfg['key']
end

.read!Object



4
5
6
7
# File 'lib/nocion/config.rb', line 4

def read!
  path = File.join(ENV['HOME'], '.nocion.json')
  @cfg = File.exists?(path) ? JSON.parse(File.read(path)) : {}
end