Class: PicasaDownloader::EnvCredentials

Inherits:
Object
  • Object
show all
Defined in:
lib/picasa-downloader/env_credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeEnvCredentials

Returns a new instance of EnvCredentials.



5
6
7
8
# File 'lib/picasa-downloader/env_credentials.rb', line 5

def initialize
  @username = ENV['PICASA_USERNAME']
  @password = ENV['PICASA_PASSWORD']
end

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password.



3
4
5
# File 'lib/picasa-downloader/env_credentials.rb', line 3

def password
  @password
end

#usernameObject (readonly)

Returns the value of attribute username.



3
4
5
# File 'lib/picasa-downloader/env_credentials.rb', line 3

def username
  @username
end

Instance Method Details

#is_configured?Boolean

Returns:

  • (Boolean)


10
11
12
13
# File 'lib/picasa-downloader/env_credentials.rb', line 10

def is_configured?
  ENV['PICASA_USERNAME'].to_s != '' &&
  ENV['PICASA_PASSWORD'].to_s != ''
end