Class: Rubyang::Component::Base
- Inherits:
-
Object
- Object
- Rubyang::Component::Base
- Includes:
- DRb::DRbUndumped
- Defined in:
- lib/rubyang/component/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Base
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
#finish ⇒ Object
31 32 |
# File 'lib/rubyang/component/base.rb', line 31 def finish end |
#run ⇒ Object
28 29 |
# File 'lib/rubyang/component/base.rb', line 28 def run end |