Class: SnapshotUI::Web

Inherits:
Object
  • Object
show all
Defined in:
lib/snapshot_ui/web.rb,
lib/snapshot_ui/web/application.rb

Defined Under Namespace

Classes: Application

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(env) ⇒ Object



10
11
12
# File 'lib/snapshot_ui/web.rb', line 10

def self.call(env)
  new.call(env)
end

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/snapshot_ui/web.rb', line 14

def call(env)
  app =
    Rack::Builder.app do
      use Rack::Static,
        root: "#{File.dirname(__FILE__)}/web/assets",
        urls: %w[/stylesheets /javascripts]

      run Application.new
    end

  app.call(env)
end