Sha256: 9effdea042ea70e73421e084ec2c14fdbe905ad33ce064a9e1148a0a00610d43

Contents?: true

Size: 352 Bytes

Versions: 18

Compression:

Stored size: 352 Bytes

Contents

module Rack::App::Test::SingletonMethods

  def rack_app(rack_app_class=nil, &constructor)
    in_this_context(:__rack_app_class__) { rack_app_class }
    in_this_context(:__rack_app_constructor__) { constructor }
    nil
  end

  def in_this_context(name, &block)
    let(name, &block)
  rescue NoMethodError
    define_method(name, &block)
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rack-app-5.1.0 lib/rack/app/test/singleton_methods.rb
rack-app-5.0.0 lib/rack/app/test/singleton_methods.rb
rack-app-5.0.0.rc2 lib/rack/app/test/singleton_methods.rb
rack-app-5.0.0.rc1 lib/rack/app/test/singleton_methods.rb
rack-app-4.0.1 lib/rack/app/test/singleton_methods.rb
rack-app-3.6.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.5.2 lib/rack/app/test/singleton_methods.rb
rack-app-3.5.1 lib/rack/app/test/singleton_methods.rb
rack-app-3.5.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.4.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.3.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.2.1 lib/rack/app/test/singleton_methods.rb
rack-app-3.2.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.1.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.0.0 lib/rack/app/test/singleton_methods.rb
rack-app-3.0.0.delta lib/rack/app/test/singleton_methods.rb
rack-app-3.0.0.gamma lib/rack/app/test/singleton_methods.rb
rack-app-3.0.0.beta lib/rack/app/test/singleton_methods.rb