Class: Roma::Watcher

Inherits:
Object
  • Object
show all
Defined in:
lib/roma/tools/sample_watcher.rb,
lib/roma/tools/sample_watcher2.rb,
lib/roma/tools/sample_watcher3.rb

Instance Method Summary collapse

Constructor Details

#initializeWatcher

Returns a new instance of Watcher.



11
12
13
# File 'lib/roma/tools/sample_watcher.rb', line 11

def initialize
  @sender = Roma::Client::Sender.new
end

Instance Method Details

#get_node_list(nid) ⇒ Object



15
16
17
# File 'lib/roma/tools/sample_watcher.rb', line 15

def get_node_list(nid)
  @sender.send_command(nid, "nodelist").split(' ')
end

#watch(nid, command) ⇒ Object



15
16
17
# File 'lib/roma/tools/sample_watcher2.rb', line 15

def watch(nid, command)
  ret = @sender.send_command(nid, command, value = nil, :multiplelines_receiver)
end