Class: CmConsole

Inherits:
Object
  • Object
show all
Defined in:
lib/console.rb

Instance Method Summary collapse

Constructor Details

#initializeCmConsole

Returns a new instance of CmConsole.



6
7
8
# File 'lib/console.rb', line 6

def initialize
	@cm = DRbObject.new_with_uri('druby://127.0.0.1:8112')
end

Instance Method Details

#assert(identifier, data) ⇒ Object



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

def assert(identifier, data)
  @cm.assert(identifier, data)
rescue DRb::DRbError => ex
end

#dump_kb(identifier) ⇒ Object



26
27
28
29
30
# File 'lib/console.rb', line 26

def dump_kb(identifier)
  @cm.dump_kb(identifier)
rescue DRb::DRbError => ex
  []
end

#dump_sagas(identifier) ⇒ Object



32
33
34
35
36
# File 'lib/console.rb', line 32

def dump_sagas(identifier)
  @cm.dump_sagas(identifier)
rescue DRb::DRbError => ex
  []
end

#list_inproc_agentsObject



10
11
12
13
14
# File 'lib/console.rb', line 10

def list_inproc_agents
@cm.list_inproc_agents()
	rescue DRb::DRbError => ex
[]
end

#retract(identifier, data) ⇒ Object



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

def retract(identifier, data)
  @cm.retract(identifier, data)
rescue DRb::DRbError => ex
end