Class: Rackr::Router::Route
- Inherits:
-
Object
- Object
- Rackr::Router::Route
- Defined in:
- lib/rackr/router/route.rb
Instance Attribute Summary collapse
-
#afters ⇒ Object
readonly
Returns the value of attribute afters.
-
#befores ⇒ Object
readonly
Returns the value of attribute befores.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#has_afters ⇒ Object
readonly
Returns the value of attribute has_afters.
-
#has_befores ⇒ Object
readonly
Returns the value of attribute has_befores.
Instance Method Summary collapse
- #has_params ⇒ Object
-
#initialize(endpoint, befores: [], afters: []) ⇒ Route
constructor
A new instance of Route.
- #match? ⇒ Boolean
- #splitted_path ⇒ Object
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
#afters ⇒ Object (readonly)
Returns the value of attribute afters.
6 7 8 |
# File 'lib/rackr/router/route.rb', line 6 def afters @afters end |
#befores ⇒ Object (readonly)
Returns the value of attribute befores.
6 7 8 |
# File 'lib/rackr/router/route.rb', line 6 def befores @befores end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
6 7 8 |
# File 'lib/rackr/router/route.rb', line 6 def endpoint @endpoint end |
#has_afters ⇒ Object (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_befores ⇒ Object (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_params ⇒ Object
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_path ⇒ Object
21 |
# File 'lib/rackr/router/route.rb', line 21 def splitted_path = [] |