Class: NSCA::Client::Service

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Service

Returns a new instance of Service.



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

def initialize(options)
  @name = options[:name]
  @host = options[:host] || Host.current
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/nsca/client/service.rb', line 4

def host
  @host
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/nsca/client/service.rb', line 4

def name
  @name
end