Class: Rubicante::HostError

Inherits:
Object
  • Object
show all
Defined in:
lib/rubicante/host_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_portsObject

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_servicesObject

Returns the value of attribute bad_services.



6
7
8
# File 'lib/rubicante/host_error.rb', line 6

def bad_services
  @bad_services
end

#hostnameObject (readonly)

Returns the value of attribute hostname.



5
6
7
# File 'lib/rubicante/host_error.rb', line 5

def hostname
  @hostname
end

#pingObject

Returns the value of attribute ping.



6
7
8
# File 'lib/rubicante/host_error.rb', line 6

def ping
  @ping
end

#website_errorsObject (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