Class: Wayfarer::Routing::Matchers::Scheme

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#schemeObject

Returns the value of attribute scheme

Returns:

  • (Object)

    the current value of scheme



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

def scheme
  @scheme
end

Instance Method Details

#match(url) ⇒ Object



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

def match(url)
  url.scheme == scheme.to_s
end

#params(_) ⇒ Object



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

def params(_)
  {}
end