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.



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

#paramsObject (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

Returns:

  • (Boolean)


17
18
19
# File 'lib/fit_api/router/parser.rb', line 17

def match?
  @match
end