Class: Wayfarer::Routing::Matchers::URL

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



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

def url
  @url
end

Instance Method Details

#match(url) ⇒ Object



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

def match(url)
  url == Addressable::URI.parse(self.url)
end

#params(_) ⇒ Object



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

def params(_)
  {}
end