Class: Volt::Console

Inherits:
Object show all
Defined in:
lib/volt/cli/console.rb

Defined Under Namespace

Modules: Helpers

Class Method Summary collapse

Class Method Details

.startObject



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/volt/cli/console.rb', line 43

def self.start
  require 'pry'

  $LOAD_PATH << 'lib'
  ENV['SERVER'] = 'true'

  require 'volt'
  require 'volt/boot'
  require 'volt/volt/core'
  require 'volt/server/socket_connection_handler_stub'

  SocketConnectionHandlerStub.dispatcher = Dispatcher.new

  Volt.boot(Dir.pwd)

  Pry.config.prompt_name = 'volt'

  Pry.main.send(:include, Volt::Console::Helpers)

  # $page.pry
  Pry.start
end