Class: RubyServiceHelper

Inherits:
Win32::Daemon show all
Defined in:
lib/ruby_service_helper.rb

Constant Summary collapse

Version =
VERSION = '0.1.0'

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.serviceObject

Returns the value of attribute service.



11
12
13
# File 'lib/ruby_service_helper.rb', line 11

def service
  @service
end

.shutdownObject

Returns the value of attribute shutdown.



11
12
13
# File 'lib/ruby_service_helper.rb', line 11

def shutdown
  @shutdown
end

Class Method Details

.startObject



17
18
19
# File 'lib/ruby_service_helper.rb', line 17

def self.start
  self.mainloop
end

.versionObject



9
# File 'lib/ruby_service_helper.rb', line 9

def self.version; Version; end

Instance Method Details

#service_mainObject

:nodoc:



21
22
23
# File 'lib/ruby_service_helper.rb', line 21

def service_main #:nodoc:
  self.class.service.call
end

#service_stopObject

:nodoc:



25
26
27
# File 'lib/ruby_service_helper.rb', line 25

def service_stop #:nodoc:
  self.class.shutdown.call
end