Sha256: ce01bf59e2a5d133a29af2da27fc2010eb067c95b50ee8349acde0658fc59084

Contents?: true

Size: 571 Bytes

Versions: 54

Compression:

Stored size: 571 Bytes

Contents

module Rack::App::SingletonMethods::Settings

  def cli(&block)
    @cli ||= Rack::App::CLI.new
    @cli.instance_exec(&block) unless block.nil?
    @cli
  end

  protected

  def headers(new_headers=nil)
    middleware do |b|
      b.use(Rack::App::Middlewares::HeaderSetter,new_headers)
    end if new_headers.is_a?(Hash)

    new_headers
  end

  def error(*exception_classes, &block)
    @error_handler ||= Rack::App::ErrorHandler.new
    unless block.nil?
      @error_handler.register_handler(exception_classes, block)
    end

    return @error_handler
  end

end

Version data entries

54 entries across 54 versions & 2 rubygems

Version Path
rack-app-11.0.2 lib/rack/app/singleton_methods/settings.rb
rack-app-11.0.1 lib/rack/app/singleton_methods/settings.rb
rack-app-11.0.0 lib/rack/app/singleton_methods/settings.rb
rack-app-10.0.0 lib/rack/app/singleton_methods/settings.rb
rack-app-9.0.0 lib/rack/app/singleton_methods/settings.rb
rack-app-8.1.0 lib/rack/app/singleton_methods/settings.rb
rack-app-8.0.1 lib/rack/app/singleton_methods/settings.rb
rack-app-8.0.0 lib/rack/app/singleton_methods/settings.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/singleton_methods/settings.rb
rack-app-7.7.0 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.5 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.4 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.3 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.2 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.1 lib/rack/app/singleton_methods/settings.rb
rack-app-7.6.0 lib/rack/app/singleton_methods/settings.rb
rack-app-7.5.2 lib/rack/app/singleton_methods/settings.rb
rack-app-7.5.1 lib/rack/app/singleton_methods/settings.rb
rack-app-7.5.0 lib/rack/app/singleton_methods/settings.rb
rack-app-7.4.0 lib/rack/app/singleton_methods/settings.rb