Module: TTK::Services::DRbService::SubTestable

Defined in:
lib/ttk/services/DRbService/sub_testable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included?(mod) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
31
32
# File 'lib/ttk/services/DRbService/sub_testable.rb', line 28

def self.included?(mod)
  mod.module_eval do
    attr_reader :sub_testers
  end
end

Instance Method Details

#sub_testable_initializeObject



15
16
17
18
# File 'lib/ttk/services/DRbService/sub_testable.rb', line 15

def sub_testable_initialize
  @sub_testers = {}
  @sub_testers.extend(Mutex_m)
end

#sub_testable_set(sub_tester_uris) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/ttk/services/DRbService/sub_testable.rb', line 20

def sub_testable_set(sub_tester_uris)
  @sub_testers.clear
  sub_tester_uris.each do |sub_tester_uri|
  @sub_testers[sub_tester_uri] = DRbObject.new(nil,
                                               sub_tester_uri.to_s)
  end
end