class Pakyow::Endpoint

Attributes

builder[R]
method[R]
name[R]

Public Class Methods

new(name:, method:, builder:) click to toggle source
# File lib/pakyow/endpoints.rb, line 86
def initialize(name:, method:, builder:)
  @name, @method, @builder = name.to_sym, method.to_sym, builder
end

Public Instance Methods

path(hashlike_object = nil, **params) click to toggle source
# File lib/pakyow/endpoints.rb, line 90
def path(hashlike_object = nil, **params)
  @builder.call(**(hashlike_object || params).to_h)
end