Class: Octopolo::Scripts::PivotalAuth

Inherits:
Object
  • Object
show all
Includes:
CLIWrapper, UserConfigWrapper
Defined in:
lib/octopolo/scripts/pivotal_auth.rb

Instance Attribute Summary collapse

Attributes included from CLIWrapper

#cli

Attributes included from UserConfigWrapper

#user_config

Instance Method Summary collapse

Instance Attribute Details

#emailObject

Returns the value of attribute email.



10
11
12
# File 'lib/octopolo/scripts/pivotal_auth.rb', line 10

def email
  @email
end

#passwordObject

Returns the value of attribute password.



11
12
13
# File 'lib/octopolo/scripts/pivotal_auth.rb', line 11

def password
  @password
end

#tokenObject

Returns the value of attribute token.



12
13
14
# File 'lib/octopolo/scripts/pivotal_auth.rb', line 12

def token
  @token
end

Instance Method Details

#executeObject



14
15
16
17
18
19
20
# File 'lib/octopolo/scripts/pivotal_auth.rb', line 14

def execute
  ask_credentials
  request_token
  store_token
rescue Pivotal::BadCredentials => e
  cli.say e.message
end