Class: JsRoutes::JsRoute
- Inherits:
-
Object
- Object
- JsRoutes::JsRoute
- Defined in:
- lib/js_routes.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#parent_route ⇒ Object
readonly
Returns the value of attribute parent_route.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
Instance Method Summary collapse
- #helpers ⇒ Object
-
#initialize(configuration, route, parent_route = nil) ⇒ JsRoute
constructor
A new instance of JsRoute.
Constructor Details
#initialize(configuration, route, parent_route = nil) ⇒ JsRoute
Returns a new instance of JsRoute.
253 254 255 256 257 |
# File 'lib/js_routes.rb', line 253 def initialize(configuration, route, parent_route = nil) @configuration = configuration @route = route @parent_route = parent_route end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
251 252 253 |
# File 'lib/js_routes.rb', line 251 def configuration @configuration end |
#parent_route ⇒ Object (readonly)
Returns the value of attribute parent_route.
251 252 253 |
# File 'lib/js_routes.rb', line 251 def parent_route @parent_route end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
251 252 253 |
# File 'lib/js_routes.rb', line 251 def route @route end |
Instance Method Details
#helpers ⇒ Object
259 260 261 262 263 264 265 266 267 268 |
# File 'lib/js_routes.rb', line 259 def helpers unless match_configuration? [] else [false, true].map do |absolute| absolute && !@configuration[:url_links] ? nil : [ documentation, helper_name(absolute), body(absolute) ] end end end |