Method: Silicon::Routing::Route#initialize
- Defined in:
- lib/silicon/routing/route.rb
#initialize(hash) ⇒ Route
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/silicon/routing/route.rb', line 7 def initialize(hash) @http_verb = hash[:http_verb] @path = hash[:path].sub('.', '/').sub('//', '/') @params = hash[:params] @commands = hash[:commands] @view = hash[:view] @http_status = hash[:http_status] @segments = @path.split('/').concat(['/']) @catch = hash[:catch] end |