Class: DashingContrib::Pingdom::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/dashing-contrib/bottles/pingdom/credentials.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Credentials

Returns a new instance of Credentials.



8
9
10
11
12
13
14
# File 'lib/dashing-contrib/bottles/pingdom/credentials.rb', line 8

def initialize(options = {})
  user_options = default_options.merge(options)
  @api_key = user_options[:api_key] || missing_args(:api_key)
  @password = CGI.escape(user_options[:password]) || missing_args(:password)
  @username = CGI.escape(user_options[:username]) || missing_args(:username)
  @team_account = user_options[:team_account]
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



6
7
8
# File 'lib/dashing-contrib/bottles/pingdom/credentials.rb', line 6

def api_key
  @api_key
end

#passwordObject

Returns the value of attribute password.



6
7
8
# File 'lib/dashing-contrib/bottles/pingdom/credentials.rb', line 6

def password
  @password
end

#team_accountObject

Returns the value of attribute team_account.



6
7
8
# File 'lib/dashing-contrib/bottles/pingdom/credentials.rb', line 6

def 
  @team_account
end

#usernameObject

Returns the value of attribute username.



6
7
8
# File 'lib/dashing-contrib/bottles/pingdom/credentials.rb', line 6

def username
  @username
end