Class: Console

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

Class Method Summary collapse

Class Method Details

.startObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/volt/console.rb', line 2

def self.start
  require 'pry'

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

  require 'volt'
  require 'volt/models'
  require 'volt'
  require 'volt/page/page'
  require 'volt/server/rack/component_paths'
  require 'volt/server/socket_connection_handler_stub'

  SocketConnectionHandlerStub.dispatcher = Dispatcher.new


  app_path = File.expand_path(File.join(Dir.pwd, "app"))
  component_paths = ComponentPaths.new
  component_paths.require_in_components

  Pry.config.prompt_name = 'volt'

  # start a REPL session
  # Pry.start

  Page.new.pry
end