Class: Apperol::Creds

Inherits:
Object
  • Object
show all
Defined in:
lib/apperol/creds.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.githubObject



8
9
10
# File 'lib/apperol/creds.rb', line 8

def github
  instance.github
end

.herokuObject



4
5
6
# File 'lib/apperol/creds.rb', line 4

def heroku
  instance.heroku
end

.instanceObject



12
13
14
# File 'lib/apperol/creds.rb', line 12

def instance
  @instance ||= new
end

Instance Method Details

#githubObject



21
22
23
# File 'lib/apperol/creds.rb', line 21

def github
  netrc["api.github.com"]
end

#herokuObject



17
18
19
# File 'lib/apperol/creds.rb', line 17

def heroku
  netrc["api.heroku.com"]
end

#netrcObject



25
26
27
# File 'lib/apperol/creds.rb', line 25

def netrc
  @netrc ||= Netrc.read
end