Sha256: 03d2107d47f04f0f40c6a7f06d38ae0072a0e806bb95ecae189715b93d89e48a

Contents?: true

Size: 337 Bytes

Versions: 4

Compression:

Stored size: 337 Bytes

Contents

module Ramaze
  class Fiber < ::Fiber
    attr_accessor :state

    def initialize(*args)
      super
      @state = {}
    end

    attr_accessor :state

    def [](key)
      @state[key]
    end

    def []=(key, value)
      @state[key] = value
    end

    def key?(key)
      @state.key?(key)
    end
  end if defined?(::Fiber)
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.02 lib/ramaze/snippets/ramaze/fiber.rb
ptomato-ramaze-2009.02.1 lib/ramaze/snippets/ramaze/fiber.rb
ptomato-ramaze-2009.02 lib/ramaze/snippets/ramaze/fiber.rb
ramaze-2009.03 lib/ramaze/snippets/ramaze/fiber.rb