Class: Rubicante::HostError
- Inherits:
-
Object
- Object
- Rubicante::HostError
- Defined in:
- lib/rubicante/host_error.rb
Instance Attribute Summary collapse
-
#bad_ports ⇒ Object
Returns the value of attribute bad_ports.
-
#bad_services ⇒ Object
Returns the value of attribute bad_services.
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#ping ⇒ Object
Returns the value of attribute ping.
-
#website_errors ⇒ Object
readonly
Returns the value of attribute website_errors.
Instance Method Summary collapse
- #add(error) ⇒ Object
-
#initialize(hostname) ⇒ HostError
constructor
A new instance of HostError.
Constructor Details
#initialize(hostname) ⇒ HostError
Returns a new instance of HostError.
8 9 10 11 12 13 14 |
# File 'lib/rubicante/host_error.rb', line 8 def initialize(hostname) @hostname = hostname @ping = false @bad_ports = [] @bad_services = [] @website_errors = [] end |
Instance Attribute Details
#bad_ports ⇒ Object
Returns the value of attribute bad_ports.
6 7 8 |
# File 'lib/rubicante/host_error.rb', line 6 def bad_ports @bad_ports end |
#bad_services ⇒ Object
Returns the value of attribute bad_services.
6 7 8 |
# File 'lib/rubicante/host_error.rb', line 6 def bad_services @bad_services end |
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
5 6 7 |
# File 'lib/rubicante/host_error.rb', line 5 def hostname @hostname end |
#ping ⇒ Object
Returns the value of attribute ping.
6 7 8 |
# File 'lib/rubicante/host_error.rb', line 6 def ping @ping end |
#website_errors ⇒ Object (readonly)
Returns the value of attribute website_errors.
5 6 7 |
# File 'lib/rubicante/host_error.rb', line 5 def website_errors @website_errors end |
Instance Method Details
#add(error) ⇒ Object
16 17 18 19 20 |
# File 'lib/rubicante/host_error.rb', line 16 def add(error) if error.kind_of? WebsiteError @website_errors << error end end |