class Silicon::Routing::Route

Attributes

catch[R]
commands[R]
http_status[R]
http_verb[R]
params[R]
path[R]
segments[R]
view[R]

Public Class Methods

new(hash) click to toggle source
# 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