Sha256: 47bce2be42474fa7664e4c88f939b8baecff437b8ffd8bc9502041a221af66a0
Contents?: true
Size: 547 Bytes
Versions: 5
Compression:
Stored size: 547 Bytes
Contents
require 'diesel/middleware_builder' require 'diesel/middleware_stack' module Diesel class Endpoint attr_reader :name, :url, :request_method def initialize(name, url, request_method) @name, @url, @request_method = name, url, request_method end def middlewares @middlewares ||= [] end def middleware_stack @middleware_stack ||= MiddlewareStack.new(middlewares) end def config_middleware(&block) builder = MiddlewareBuilder.new(middlewares) builder.build(&block) end end end
Version data entries
5 entries across 5 versions & 1 rubygems