Sha256: b47ef16cc1ecd89e409d07bfd2017d16971ca87971f78626d896464f675658ca

Contents?: true

Size: 390 Bytes

Versions: 4

Compression:

Stored size: 390 Bytes

Contents

module RoutingFilter
  class ResultWrapper
    RouteWithParams = Struct.new(:url, :params) do
      def path(_)
        url
      end
    end

    attr_reader :url, :params

    def initialize(result)
      @url = result.path(nil)
      @params = result.params
    end

    def update(url)
      @url = url
    end

    def generate
      RouteWithParams.new(url, params)
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
routing-filter-codeur-0.7.1.2 lib/routing_filter/result_wrapper.rb
routing-filter-codeur-0.7.1.1 lib/routing_filter/result_wrapper.rb
routing-filter-codeur-0.7.1 lib/routing_filter/result_wrapper.rb
routing-filter-0.7.0 lib/routing_filter/result_wrapper.rb