Class: NSCA::Client::Host

Inherits:
Object
  • Object
show all
Defined in:
lib/nsca/client/host.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Host

Returns a new instance of Host.



8
9
10
# File 'lib/nsca/client/host.rb', line 8

def initialize(options)
  @hostname = options[:hostname]
end

Instance Attribute Details

#hostnameObject (readonly)

Returns the value of attribute hostname.



6
7
8
# File 'lib/nsca/client/host.rb', line 6

def hostname
  @hostname
end

Class Method Details

.currentObject



12
13
14
# File 'lib/nsca/client/host.rb', line 12

def self.current
  Host.new(:hostname => Socket.gethostname)
end