Class: Easymon::HttpCheck
- Inherits:
-
Object
- Object
- Easymon::HttpCheck
- Defined in:
- lib/easymon/checks/http_check.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(url) ⇒ HttpCheck
constructor
A new instance of HttpCheck.
Constructor Details
#initialize(url) ⇒ HttpCheck
Returns a new instance of HttpCheck.
7 8 9 |
# File 'lib/easymon/checks/http_check.rb', line 7 def initialize(url) self.url = url end |
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/easymon/checks/http_check.rb', line 5 def url @url end |
Instance Method Details
#check ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/easymon/checks/http_check.rb', line 11 def check check_status = http_up?(url) if check_status = "Up" else = "Down" end [check_status, ] end |