Sha256: d30d7be2cf7e95759771a114f561ca0cd71c6bcf374c9fb1b94b2cee5e62bc59

Contents?: true

Size: 712 Bytes

Versions: 8

Compression:

Stored size: 712 Bytes

Contents

class Rack::App::Endpoint

  require "forwardable"
  extend Forwardable
  def_delegators :@config, :request_method, :request_path, :description

  require "rack/app/endpoint/config"
  require "rack/app/endpoint/builder"
  require "rack/app/endpoint/executor"

  attr_reader :config

  def initialize(properties)
    @config = Rack::App::Endpoint::Config.new(properties)
  end

  def fork(differences_in_properties)
    self.class.new(self.properties.merge(differences_in_properties))
  end

  def properties
    @config.to_hash
  end

  def call(env)
    to_app.call(env)
  end

  def to_app
    self.class::Builder.new(@config).build
  end

  def rack_app?
    !!@config.app_class
  rescue
    false
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rack-app-6.4.1 lib/rack/app/endpoint.rb
rack-app-6.4.0 lib/rack/app/endpoint.rb
rack-app-6.3.3 lib/rack/app/endpoint.rb
rack-app-6.3.2 lib/rack/app/endpoint.rb
rack-app-6.3.1 lib/rack/app/endpoint.rb
rack-app-6.3.0 lib/rack/app/endpoint.rb
rack-app-6.2.0 lib/rack/app/endpoint.rb
rack-app-6.1.0 lib/rack/app/endpoint.rb