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.



62
63
64
65
# File 'lib/guides/preview.rb', line 62

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

Class Method Details

.start(options = {}) ⇒ Object



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

def self.start(options = {})
  super options.merge(:host => '0.0.0.0', :Port => 9292, :server => "thin")
end

Instance Method Details

#appObject



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

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