Class: Rackr::Router::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/rackr/router/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint, befores: [], afters: []) ⇒ Route



12
13
14
15
16
17
18
# File 'lib/rackr/router/route.rb', line 12

def initialize(endpoint, befores: [], afters: [])
  @endpoint = endpoint
  @befores = befores
  @has_befores = befores != []
  @afters = afters
  @has_afters = afters != []
end

Instance Attribute Details

#aftersObject (readonly)

Returns the value of attribute afters.



6
7
8
# File 'lib/rackr/router/route.rb', line 6

def afters
  @afters
end

#beforesObject (readonly)

Returns the value of attribute befores.



6
7
8
# File 'lib/rackr/router/route.rb', line 6

def befores
  @befores
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



6
7
8
# File 'lib/rackr/router/route.rb', line 6

def endpoint
  @endpoint
end

#has_aftersObject (readonly)

Returns the value of attribute has_afters.



6
7
8
# File 'lib/rackr/router/route.rb', line 6

def has_afters
  @has_afters
end

#has_beforesObject (readonly)

Returns the value of attribute has_befores.



6
7
8
# File 'lib/rackr/router/route.rb', line 6

def has_befores
  @has_befores
end

Instance Method Details

#has_paramsObject



22
# File 'lib/rackr/router/route.rb', line 22

def has_params = false

#match?Boolean



20
# File 'lib/rackr/router/route.rb', line 20

def match? = true

#splitted_pathObject



21
# File 'lib/rackr/router/route.rb', line 21

def splitted_path = []