Sha256: 9c79038e6c1ce6efff196de68a1593ef459d68d6f1240d3498edf9bf0af8d490

Contents?: true

Size: 296 Bytes

Versions: 2

Compression:

Stored size: 296 Bytes

Contents

class RackApp
  attr_reader :last_value, :store_active

  def call(env)
    RequestStore.store[:foo] ||= 0
    RequestStore.store[:foo] += 1
    @last_value = RequestStore.store[:foo]
    @store_active = RequestStore.active?
    raise 'FAIL' if env[:error]

    [200, {}, ["response"]]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
request_store-1.4.1 test/test_helper.rb
request_store-1.4.0 test/test_helper.rb