Module: Configuration

Defined in:
lib/rebo/config.rb

Instance Method Summary collapse

Instance Method Details

#from_json(file_path) ⇒ Object



2
3
4
5
# File 'lib/rebo/config.rb', line 2

def from_json(file_path)
  require 'json'
  JSON.parse(File.read(file_path))
end

#readObject



7
8
9
# File 'lib/rebo/config.rb', line 7

def read()
  File.file?(NPM_FILE) ? from_json(NPM_FILE) : {}
end