Parent

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.

@since 2.5.0

Public Instance Methods

invalid?() click to toggle source

NEWPROPERTY

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

Initializes a new {Scanners::WhoisCiraCa} instance passing the {content_for_scanner} and calls parse on it.

@return [Hash]

# File lib/whois/record/parser/whois.cira.ca.rb, line 167
def parse
  Scanners::WhoisCiraCa.new(content_for_scanner).parse
end
schema() click to toggle source

Attempts to detect and returns the schema version.

TODO: This is very empiric.

Use the available status in combination with the creation date label.
# File lib/whois/record/parser/whois.cira.ca.rb, line 137
def schema
  @schema ||= if content_for_scanner =~ /^% \(c\) (.+?) Canadian Internet Registration Authority/
    case $1
    when "2007" then "1"
    when "2010" then "2"
    end
  end
  @schema || Whois.bug!(ParserError, "Unable to detect schema version.")
end
valid?() click to toggle source

NEWPROPERTY

# File lib/whois/record/parser/whois.cira.ca.rb, line 148
def valid?
  cached_properties_fetch(:valid?) do
    !invalid?
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.