class SiteInspector::Endpoint::Check
Attributes
endpoint[R]
Public Class Methods
enabled=(value)
click to toggle source
# File lib/site-inspector/checks/check.rb, line 48 def enabled=(value) @@enabled = !!value end
enabled?()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 44 def enabled? !!@@enabled end
name()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 40 def name to_s.split('::').last.downcase.to_sym end
new(endpoint)
click to toggle source
A check is an abstract class that takes an Endpoint
object and is extended to preform the specific site inspector checks
It is automatically accessable within the endpoint object by virtue of extending the Check
class
# File lib/site-inspector/checks/check.rb, line 13 def initialize(endpoint) @endpoint = endpoint end
Public Instance Methods
host()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 25 def host request.base_url.host end
inspect()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 29 def inspect "#<#{self.class} endpoint=\"#{response.effective_url}\">" end
name()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 33 def name self.class.name end
request()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 21 def request response.request end
response()
click to toggle source
# File lib/site-inspector/checks/check.rb, line 17 def response endpoint.response end