Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inesita-rb/inesita-router
https://github.com/inesita-rb/inesita-router
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/inesita-rb/inesita-router
- Owner: inesita-rb
- License: mit
- Created: 2016-10-29T19:11:16.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-12T22:19:59.000Z (over 1 year ago)
- Last Synced: 2024-08-01T17:36:47.135Z (5 months ago)
- Language: Ruby
- Size: 19.5 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Inesita Router [![Gem Version](https://badge.fury.io/rb/inesita-router.svg)](http://badge.fury.io/rb/inesita-router) [![Code Climate](https://codeclimate.com/github/inesita-rb/inesita-router/badges/gpa.svg)](https://codeclimate.com/github/inesita-rb/inesita-router) [![Build Status](https://travis-ci.org/inesita-rb/inesita-router.svg?branch=master)](https://travis-ci.org/inesita-rb/inesita-router)
Router for [Inesita](https://github.com/inesita-rb/inesita) framework.
## Example
```ruby
class Router
include Inesita::Routerdef auth
unless store.logged_in?
go_to('/login')
end
enddef routes
route '/', to: Home, on_enter: method(:auth)
route '/list', to: List, on_enter: method(:auth)
route '/login', to: Login
end
end
```## Thank you!
[![Become Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/bePatron?u=6912974)