Sha256: 6a4c3d5dab00ae90249170189dd5c0dfd9c2c6d40ccf232bc014b89045f46523

Contents?: true

Size: 308 Bytes

Versions: 3

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module Wayfarer
  module Middleware
    module Base
      API_MODULE = :API

      def api
        return const_get(API_MODULE) if const_defined?(API_MODULE)

        Module.new
      end

      def lazy
        Wayfarer::Middleware::Lazy.new(self)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wayfarer-0.4.6 lib/wayfarer/middleware/base.rb
wayfarer-0.4.5 lib/wayfarer/middleware/base.rb
wayfarer-0.4.4 lib/wayfarer/middleware/base.rb