Module: RouteTranslator::Mapper
- Defined in:
- lib/route_translator.rb
Instance Method Summary collapse
-
#localized ⇒ Object
yield the block and add all the routes created in it to the localized_routes array.
Instance Method Details
#localized ⇒ Object
yield the block and add all the routes created in it to the localized_routes array
42 43 44 45 46 47 48 49 |
# File 'lib/route_translator.rb', line 42 def localized routes_before = @set.routes.map(&:to_s) yield routes_after = @set.routes.map(&:to_s) @set.localized_routes ||= [] @set.localized_routes.concat(routes_after - routes_before) @set.localized_routes.uniq! end |