Sha256: b00f12ddce44c9bb0b1d3638a38a2886e5bdcd386d6996f6fb2f7419f6bc75eb
Contents?: true
Size: 470 Bytes
Versions: 1
Compression:
Stored size: 470 Bytes
Contents
module Socrates module Bots class CLIBot def initialize(state_factory:) @adapter = ConsoleAdapter.new @dispatcher = Core::Dispatcher.new(adapter: @adapter, state_factory: state_factory) end def start # Clear out any remnants from previous runs. @storage.clear(ConsoleAdapter::CLIENT_ID) while (input = gets.chomp) @dispatcher.dispatch(message: input) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
socrates-0.1.1 | lib/socrates/bots/cli_bot.rb |