Class: PactBroker::UI::App

Inherits:
Object
  • Object
show all
Defined in:
lib/pact_broker/ui/app.rb

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/pact_broker/ui/app.rb', line 9

def initialize
  @app = ::Rack::Builder.new {

    map "/ui/relationships" do
      run PactBroker::UI::Controllers::Relationships
    end

    map "/groups" do
      run PactBroker::UI::Controllers::Groups
    end

    map "/doc" do
      run PactBroker::Doc::Controllers::App
    end

    map "/" do
      run PactBroker::UI::Controllers::Relationships
    end
  }
end

Instance Method Details

#call(env) ⇒ Object



30
31
32
# File 'lib/pact_broker/ui/app.rb', line 30

def call env
  @app.call(env)
end