Sha256: 0005d8d3c340192ca44f598859371302110683efc41677276756d84f27362311
Contents?: true
Size: 514 Bytes
Versions: 9
Compression:
Stored size: 514 Bytes
Contents
require "socrates/adapters/console" require "socrates/core/dispatcher" module Socrates module Bots class CLI def initialize(adapter: nil, state_factory:) @adapter = adapter || Adapters::Console.new @dispatcher = Core::Dispatcher.new(adapter: @adapter, state_factory: state_factory) end def start context = { channel: "CONSOLE" } while (input = gets.chomp) @dispatcher.dispatch(input, context: context) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems