Method: Flagit.load

Defined in:
lib/flagit.rb

.loadObject



35
36
37
38
39
40
41
42
43
44
# File 'lib/flagit.rb', line 35

def self.load
  return unless File.exist?("#{root}/.config.json")
  loaded = JSON.parse(File.read("#{root}/.config.json"))
  configure do |config|
    config.consumer_key = loaded['consumer_key']
    config.consumer_secret = loaded['consumer_secret']
    config.access_token = loaded['access_token']
    config.access_token_secret = loaded['access_token_secret']
  end
end