Class: FitApi::Router::Parser
- Inherits:
-
Object
- Object
- FitApi::Router::Parser
- Defined in:
- lib/fit_api/router/parser.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(route, path) ⇒ Parser
constructor
A new instance of Parser.
- #match? ⇒ Boolean
Constructor Details
#initialize(route, path) ⇒ Parser
Returns a new instance of Parser.
8 9 10 11 12 13 14 15 |
# File 'lib/fit_api/router/parser.rb', line 8 def initialize(route, path) @route = route @path = path.gsub(/\/$/, "") @match = false @params = {} parse end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/fit_api/router/parser.rb', line 6 def params @params end |
Instance Method Details
#match? ⇒ Boolean
17 18 19 |
# File 'lib/fit_api/router/parser.rb', line 17 def match? @match end |