Class: Wayfarer::Routing::Matchers::Suffix

Inherits:
Struct
  • Object
show all
Defined in:
lib/wayfarer/routing/matchers/suffix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#suffixObject

Returns the value of attribute suffix

Returns:

  • (Object)

    the current value of suffix



6
7
8
# File 'lib/wayfarer/routing/matchers/suffix.rb', line 6

def suffix
  @suffix
end

Instance Method Details

#match(url) ⇒ Object



7
8
9
# File 'lib/wayfarer/routing/matchers/suffix.rb', line 7

def match(url)
  url.path.end_with?(suffix)
end

#params(_) ⇒ Object



11
12
13
# File 'lib/wayfarer/routing/matchers/suffix.rb', line 11

def params(_)
  {}
end