Module: WhoisXMLAPI

Defined in:
lib/whoisxmlapi.rb,
lib/whoisxmlapi/good.rb,
lib/whoisxmlapi/client.rb,
lib/whoisxmlapi/result.rb,
lib/whoisxmlapi/contact.rb,
lib/whoisxmlapi/version.rb,
lib/whoisxmlapi/bad_domain.rb,
lib/whoisxmlapi/un_parsable.rb,
lib/whoisxmlapi/unavailable.rb,
lib/whoisxmlapi/rwhois_result.rb

Defined Under Namespace

Classes: BadDomain, Client, Contact, Good, RWhoisResult, Result, UnParsable, Unavailable

Constant Summary collapse

VERSION =
"0.0.21"

Class Method Summary collapse

Class Method Details

.api_keyObject



36
37
38
# File 'lib/whoisxmlapi.rb', line 36

def self.api_key
  @api_key
end

.api_key=(key) ⇒ Object



40
41
42
# File 'lib/whoisxmlapi.rb', line 40

def self.api_key=(key)
  @api_key = key
end

.cacheObject



56
57
58
# File 'lib/whoisxmlapi.rb', line 56

def self.cache
  @cache.nil? or @cache.blank? ? true : @cache
end

.cache=(bool) ⇒ Object



52
53
54
# File 'lib/whoisxmlapi.rb', line 52

def self.cache=(bool)
  @cache = bool
end

.cache_lengthObject



48
49
50
# File 'lib/whoisxmlapi.rb', line 48

def self.cache_length
  @cache_length
end

.cache_length=(leng) ⇒ Object



44
45
46
# File 'lib/whoisxmlapi.rb', line 44

def self.cache_length=(leng)
  @cache_length = leng
end

.callbacksObject



68
69
70
71
72
73
# File 'lib/whoisxmlapi.rb', line 68

def self.callbacks
  @callbacks ||= {}
  @callbacks[:whois] ||= []
  @callbacks[:rwhois] ||= []
  @callbacks
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (WhoisXMLAPI)

    the object that the method was called on



84
85
86
# File 'lib/whoisxmlapi.rb', line 84

def self.configure
    yield self
end

.domainObject



12
13
14
# File 'lib/whoisxmlapi.rb', line 12

def self.domain
  @domain
end

.domain=(dom) ⇒ Object



16
17
18
# File 'lib/whoisxmlapi.rb', line 16

def self.domain=(dom)
  @domain = dom
end

.loggerObject



75
76
77
78
# File 'lib/whoisxmlapi.rb', line 75

def self.logger
  @logger ||= Logger.new(STDOUT)
  @logger
end

.logger=(log) ⇒ Object



80
81
82
# File 'lib/whoisxmlapi.rb', line 80

def self.logger=(log)
  @logger = log
end

.passwordObject



28
29
30
# File 'lib/whoisxmlapi.rb', line 28

def self.password
  @password
end

.password=(pass) ⇒ Object



32
33
34
# File 'lib/whoisxmlapi.rb', line 32

def self.password=(pass)
  @password = pass
end

.rwhois_modeObject



64
65
66
# File 'lib/whoisxmlapi.rb', line 64

def self.rwhois_mode
  @rwhois_mode ? @rwhois_mode : 'sample_purchase'
end

.rwhois_mode=(mode) ⇒ Object



60
61
62
# File 'lib/whoisxmlapi.rb', line 60

def self.rwhois_mode=(mode)
  @rwhois_mode = mode
end

.usernameObject



20
21
22
# File 'lib/whoisxmlapi.rb', line 20

def self.username
  @username
end

.username=(uname) ⇒ Object



24
25
26
# File 'lib/whoisxmlapi.rb', line 24

def self.username=(uname)
  @username = uname
end