class Wayfarer::Routing::FiletypesRule

@private

Public Class Methods

new(types, opts = {}, &proc) click to toggle source
Calls superclass method
# File lib/wayfarer/routing/filetypes_rule.rb, line 8
def initialize(types, opts = {}, &proc)
  @types = types
  super(opts, &proc)
end

Private Instance Methods

match!(uri) click to toggle source
# File lib/wayfarer/routing/filetypes_rule.rb, line 15
def match!(uri)
  @types.any? { |type| uri.path =~ /\.#{type}$/ }
end