Class: URLCanonicalize::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/url_canonicalize/result.rb

Overview

The outcome of one canonicalization: the canonical URL, the response that confirmed it, and the chain of hops that led there. Immutable

Defined Under Namespace

Classes: Hop

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#chainObject (readonly)

Returns the value of attribute chain.



11
12
13
# File 'lib/url_canonicalize/result.rb', line 11

def chain
  @chain
end

#htmlObject (readonly)

Returns the value of attribute html.



11
12
13
# File 'lib/url_canonicalize/result.rb', line 11

def html
  @html
end

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/url_canonicalize/result.rb', line 11

def response
  @response
end

#sourceObject (readonly)

Returns the value of attribute source.



11
12
13
# File 'lib/url_canonicalize/result.rb', line 11

def source
  @source
end

#urlObject (readonly)

Returns the value of attribute url.



11
12
13
# File 'lib/url_canonicalize/result.rb', line 11

def url
  @url
end

Instance Method Details

#xmlObject



13
14
15
# File 'lib/url_canonicalize/result.rb', line 13

def xml
  Nokogiri::XML(response.body)
end