Exception: Gorynich::HostNotFound

Inherits:
Error
  • Object
show all
Defined in:
lib/gorynich.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, message = nil) ⇒ HostNotFound

Returns a new instance of HostNotFound.



37
38
39
40
41
# File 'lib/gorynich.rb', line 37

def initialize(host, message = nil)
  @host = host

  super(message || I18n.t('gorynich.host_not_found', host: @host, default: "Host #{@host} not found"))
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



35
36
37
# File 'lib/gorynich.rb', line 35

def host
  @host
end