class Pakyow::Routing::Route::EndpointBuilder

Attributes

params[R]

Public Class Methods

new(route:, path:) click to toggle source
# File lib/pakyow/routing/route.rb, line 66
def initialize(route:, path:)
  @route, @path = route, path
  @params = String.normalize_path(File.join(@path.to_s, @route.path)).split("/").select { |segment|
    segment.include?(":")
  }.map { |segment|
    segment[(segment.index(":") + 1)..-1].to_sym
  }
end

Public Instance Methods

call(**params) click to toggle source
# File lib/pakyow/routing/route.rb, line 75
def call(**params)
  @route.build_path(@path, **params)
end
source_location() click to toggle source
# File lib/pakyow/routing/route.rb, line 79
def source_location
  @route.block&.source_location || []
end