Class: WhatCounts::HttpClient::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/whatcounts/http_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



42
43
44
45
# File 'lib/whatcounts/http_client.rb', line 42

def initialize
  # defaults
  api_url 'http://api.whatcounts.com/bin/api_web'
end

Instance Attribute Details

#api_urlObject

Returns the value of attribute api_url.



41
42
43
# File 'lib/whatcounts/http_client.rb', line 41

def api_url
  @api_url
end

#passwordObject

Returns the value of attribute password.



41
42
43
# File 'lib/whatcounts/http_client.rb', line 41

def password
  @password
end

#realmObject

Returns the value of attribute realm.



41
42
43
# File 'lib/whatcounts/http_client.rb', line 41

def realm
  @realm
end

Instance Method Details

#to_param_stringObject



46
47
48
# File 'lib/whatcounts/http_client.rb', line 46

def to_param_string
  @param_string ||= "r=#{realm}&pwd=#{password}"
end