Sha256: 18c31f8f3dadc7e8d8cc94a6273b4614a4843d3fa041b1d18b84e7667c72d052

Contents?: true

Size: 476 Bytes

Versions: 7

Compression:

Stored size: 476 Bytes

Contents

module Goliath
  # The console execution class for Goliath. This will load a REPL inside of a
  # running reactor with the associated Goliath config loaded.
  #
  # @private
  class Console
    # Starts the reactor and the REPL.
    #
    # @return [Nil]
    def self.run!(server)
      require 'irb'
      EM.synchrony do
        server.load_config
        Object.send(:define_method, :goliath_server) { server }
        IRB.start
        EM.stop
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
goliath-1.0.7 lib/goliath/console.rb
goliath-1.0.6 lib/goliath/console.rb
goliath-1.0.5 lib/goliath/console.rb
goliath-1.0.4 lib/goliath/console.rb
goliath-1.0.3 lib/goliath/console.rb
goliath-1.0.2 lib/goliath/console.rb
goliath-1.0.1 lib/goliath/console.rb