Class: Parameterised::Paths::PathMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/parameterised/paths/path_match.rb

Overview

Class describing a path match

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, params = {}) ⇒ PathMatch

Returns a new instance of PathMatch.

Parameters:

  • path (String)

    The original path matched against

  • params (Hash) (defaults to: {})

    Any parameters matched within the path



13
14
15
16
# File 'lib/parameterised/paths/path_match.rb', line 13

def initialize(path, params = {})
  @path = path
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



7
8
9
# File 'lib/parameterised/paths/path_match.rb', line 7

def params
  @params
end

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/parameterised/paths/path_match.rb', line 7

def path
  @path
end