Class: Bard::Ping
- Inherits:
-
Struct
- Object
- Struct
- Bard::Ping
- Defined in:
- lib/bard/ping.rb
Instance Attribute Summary collapse
-
#server ⇒ Object
Returns the value of attribute server.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#server ⇒ Object
Returns the value of attribute server
5 6 7 |
# File 'lib/bard/ping.rb', line 5 def server @server end |
Class Method Details
.call(server) ⇒ Object
6 7 8 |
# File 'lib/bard/ping.rb', line 6 def self.call server new(server).call end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'lib/bard/ping.rb', line 10 def call server.ping.reject do |url| response = get_response_with_redirect(url) rescue nil response.is_a?(Net::HTTPSuccess) end end |