class Opi::Route
Attributes
after[R]
before[R]
block[R]
method[R]
options[R]
path[R]
Public Class Methods
new(method, path, options, before, after, block)
click to toggle source
# File lib/opi/route.rb, line 5 def initialize(method, path, options, before, after, block) @method = method @path = clean_path(path) @options = options @before = before @after = after @block = block end
Private Instance Methods
clean_path(path)
click to toggle source
# File lib/opi/route.rb, line 15 def clean_path(path) path = path.gsub(/\/\//, '/') path = path.gsub(/\/$/, '') unless path == '/' path end