Class: FitApi::Router::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/fit_api/router/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route, path) ⇒ Parser

Returns a new instance of Parser.



6
7
8
9
10
11
12
13
# File 'lib/fit_api/router/parser.rb', line 6

def initialize(route, path)
  @route = route
  @path  = path.gsub(/\/$/, '')
  @match = false
  @params = {}

  parse
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'lib/fit_api/router/parser.rb', line 4

def params
  @params
end

Instance Method Details

#match?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/fit_api/router/parser.rb', line 15

def match?
  @match
end