Class: Guides::Preview

Inherits:
Rack::Server
  • Object
show all
Defined in:
lib/guides/preview.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Preview

Returns a new instance of Preview.



65
66
67
68
# File 'lib/guides/preview.rb', line 65

def initialize(options = {})
  @production = !!options[:production]
  super(options)
end

Class Method Details

.start(options = {}) ⇒ Object



58
59
60
61
62
63
# File 'lib/guides/preview.rb', line 58

def self.start(options = {})
  options = options.dup
  options[:Port] = options.delete(:port) || '9292'
  options.merge!(:host => '0.0.0.0', :server => "thin")
  super options
end

Instance Method Details

#appObject



70
71
72
# File 'lib/guides/preview.rb', line 70

def app
  @app ||= App.new(:production => @production)
end