Class: Angus::Router::PathPattern

Inherits:
Struct
  • Object
show all
Defined in:
lib/angus/router.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#param_namesObject

Returns the value of attribute param_names

Returns:

  • (Object)

    the current value of param_names



19
20
21
# File 'lib/angus/router.rb', line 19

def param_names
  @param_names
end

#re_pathObject

Returns the value of attribute re_path

Returns:

  • (Object)

    the current value of re_path



19
20
21
# File 'lib/angus/router.rb', line 19

def re_path
  @re_path
end

Instance Method Details

#match(path) ⇒ MatchData?

Matches the given path against #re_path.

Returns:

  • (MatchData)

    when match succeeds

  • (nil)

    when match fails



25
26
27
# File 'lib/angus/router.rb', line 25

def match(path)
  re_path.match(path)
end