Sha256: 98bb9b8e612f64be79318585cf7b20c4dedce2f16f2f1001d88f959f7b87367d
Contents?: true
Size: 502 Bytes
Versions: 46
Compression:
Stored size: 502 Bytes
Contents
module Rack::App::Test::SingletonMethods def rack_app(rack_app_class=nil, &constructor) klass = if !rack_app_class.nil? && rack_app_class.respond_to?(:call) rack_app_class else Class.new(Rack::App) end klass.class_eval(&constructor) unless constructor.nil? return in_this_context(:__rack_app_class__){ klass } end def in_this_context(name, &block) if respond_to?(:let) let(name, &block) else define_method(name, &block) end end end
Version data entries
46 entries across 46 versions & 2 rubygems