Class: Travis::Keychain

Inherits:
Object
  • Object
show all
Includes:
Cli::Helper
Defined in:
lib/travis/keychain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, shell, dir = '../travis-keychain') ⇒ Keychain

Returns a new instance of Keychain.



7
8
9
10
11
# File 'lib/travis/keychain.rb', line 7

def initialize(app, shell, dir = '../travis-keychain')
  @app = app
  @shell = shell
  @dir = File.expand_path(dir)
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



5
6
7
# File 'lib/travis/keychain.rb', line 5

def app
  @app
end

#dirObject (readonly)

Returns the value of attribute dir.



5
6
7
# File 'lib/travis/keychain.rb', line 5

def dir
  @dir
end

#shellObject (readonly)

Returns the value of attribute shell.



5
6
7
# File 'lib/travis/keychain.rb', line 5

def shell
  @shell
end

Instance Method Details

#fetchObject



13
14
15
16
# File 'lib/travis/keychain.rb', line 13

def fetch
  chdir { pull }
  read
end