Class: CLabs::CaseGen::ConsoleOutput

Inherits:
Agent show all
Defined in:
lib/agents/sets.rb

Instance Attribute Summary

Attributes inherited from Agent

#data, #reference_agents

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, reference_agents, io = STDOUT) ⇒ ConsoleOutput

Returns a new instance of ConsoleOutput.



259
260
261
262
263
264
265
266
267
268
269
# File 'lib/agents/sets.rb', line 259

def initialize(data, reference_agents, io=STDOUT)
  @data = data
  @agents = reference_agents
  table = [@agents[0].titles] + @agents[0].combinations
  io.puts table.to_table.pretty_inspect
  io.puts
  @agents[0].each do |rule|
    io.puts rule.data
    io.puts
  end if @agents[0].is_a?(Rules)
end

Class Method Details

.agent_idObject



255
256
257
# File 'lib/agents/sets.rb', line 255

def ConsoleOutput.agent_id
  "casegen:console"
end