Sha256: b4cce774cc25cc561fa65f9a7ffff92d50f7954c3965aa61690cd9ffb56f91eb

Contents?: true

Size: 299 Bytes

Versions: 6

Compression:

Stored size: 299 Bytes

Contents

module Gambiarra
  class Route
    attr_reader :path, :view, :last
    attr_accessor :params

    def initialize(path, to:, with: {})
      @path   = path
      @view   = to
      @params = with
    end

    def respond(**other_params)
      view.respond(**params, **other_params)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gambiarra-0.0.6 lib/gambiarra/route.rb
gambiarra-0.0.5 lib/gambiarra/route.rb
gambiarra-0.0.4 lib/gambiarra/route.rb
gambiarra-0.0.3 lib/gambiarra/route.rb
gambiarra-0.0.2 lib/gambiarra/route.rb
gambiarra-0.0.1 lib/gambiarra/route.rb