Files

Class/Module Index [+]

Quicksearch

Whois::Record::Parser::WhoisCiraCa

Parser for the whois.cira.ca server.

@see Whois::Record::Parser::Example

The Example parser for the list of all available methods.

Public Instance Methods

invalid?() click to toggle source

NEWPROPERTY

# File lib/whois/record/parser/whois.cira.ca.rb, line 160
def invalid?
  cached_properties_fetch(:invalid?) do
    status == :invalid
  end
end
valid?() click to toggle source

NEWPROPERTY

# File lib/whois/record/parser/whois.cira.ca.rb, line 153
def valid?
  cached_properties_fetch(:valid?) do
    !invalid?
  end
end
version() click to toggle source

Attempts to detect and returns the version.

TODO: This is very empiric.

Use the available status in combination with the creation date label.

NEWPROPERTY

# File lib/whois/record/parser/whois.cira.ca.rb, line 140
def version
  cached_properties_fetch :version do
    version = if content_for_scanner =~ /^% \(c\) (.+?) Canadian Internet Registration Authority/
      case $1
      when "2007" then "1"
      when "2010" then "2"
      end
    end
    version || Whois.bug!(ParserError, "Unable to detect version.")
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.