Class: Nwiki::Frontend::App
- Inherits:
-
Object
- Object
- Nwiki::Frontend::App
- Defined in:
- lib/nwiki/frontend/app.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(git_repo_path) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(git_repo_path) ⇒ App
Returns a new instance of App.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/nwiki/frontend/app.rb', line 9 def initialize git_repo_path @builder = Rack::Builder.new { map '/' do run Top.new git_repo_path end map '/articles.xml' do run Feed.new git_repo_path, articles_path: '/articles' end map '/articles' do run Html.new git_repo_path end } end |
Instance Method Details
#call(env) ⇒ Object
23 24 25 |
# File 'lib/nwiki/frontend/app.rb', line 23 def call env @builder.call env end |