Class: Rubyang::Component::Base

Inherits:
Object
  • Object
show all
Includes:
DRb::DRbUndumped
Defined in:
lib/rubyang/component/base.rb

Direct Known Subclasses

Example

Instance Method Summary collapse

Constructor Details

#initializeBase



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rubyang/component/base.rb', line 13

def initialize
  @rubyang_sock_file = "/tmp/rubyang/server/Example.sock"
  @db = DRbObject.new_with_uri( "drbunix:#{@rubyang_sock_file}" )

  #@pid = Process.pid
  @sock_dir = "/tmp/rubyang/component"
  #@sock_file = "#{@sock_dir}/#{self.class}.#{pid}.sock"
  @sock_file = "#{@sock_dir}/#{self.class}.sock"

  FileUtils.mkdir_p @sock_dir

  DRb.start_service( "drbunix:#{@sock_file}", self )
  DRb.thread.join
end

Instance Method Details

#finishObject



31
32
# File 'lib/rubyang/component/base.rb', line 31

def finish
end

#runObject



28
29
# File 'lib/rubyang/component/base.rb', line 28

def run
end