Class: PactBroker::UI::App

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

Defined Under Namespace

Classes: HtmlFilter, RedirectRootToRelationships

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
29
30
# File 'lib/pact_broker/ui/app.rb', line 9

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

    use HtmlFilter

    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 RedirectRootToRelationships
    end
  }
end

Instance Method Details

#call(env) ⇒ Object



32
33
34
# File 'lib/pact_broker/ui/app.rb', line 32

def call env
  @app.call(env)
end