Class: RDocLinkChecker::HttpStatusCodeError

Inherits:
Error
  • Object
show all
Defined in:
lib/rdoc_link_checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, code) ⇒ HttpStatusCodeError

Returns a new instance of HttpStatusCodeError.



475
476
477
478
# File 'lib/rdoc_link_checker.rb', line 475

def initialize(url, code)
  self.url = url
  self.code = code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



473
474
475
# File 'lib/rdoc_link_checker.rb', line 473

def code
  @code
end

#urlObject

Returns the value of attribute url.



473
474
475
# File 'lib/rdoc_link_checker.rb', line 473

def url
  @url
end

Instance Method Details

#messageObject



480
481
482
483
484
485
486
487
# File 'lib/rdoc_link_checker.rb', line 480

def message
  <<EOT
#{self.class.name}:
  The return code for the page was not 200:
Url: #{url}
Return code: #{code}
EOT
end