Sha256: 654891b06b9f243e17631c87329003f767c90b5a8d9b096d1991d30006bb1315

Contents?: true

Size: 392 Bytes

Versions: 3

Compression:

Stored size: 392 Bytes

Contents

module Socrates
  module Bots
    class CLIBot
      def initialize(adapter: nil, state_factory:)
        @adapter    = adapter || Adapters::ConsoleAdapter.new
        @dispatcher = Core::Dispatcher.new(adapter: @adapter, state_factory: state_factory)
      end

      def start
        while (input = gets.chomp)
          @dispatcher.dispatch(input)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
socrates-0.1.7 lib/socrates/bots/cli_bot.rb
socrates-0.1.6 lib/socrates/bots/cli_bot.rb
socrates-0.1.4 lib/socrates/bots/cli_bot.rb