Sha256: fbbcc3ceeea5cf49071846c0865c6db98122de4cf7cf42ea988274c87bafed3c

Contents?: true

Size: 408 Bytes

Versions: 45

Compression:

Stored size: 408 Bytes

Contents

require "ftw/namespace"

# A poolable mixin. This is for use with the FTW::Pool class.
module FTW::Poolable
  # Mark that this resource is in use
  def mark
    @__in_use = true
  end # def mark

  # Release this resource
  def release
    @__in_use = false
  end # def release

  # Is this resource available for use?
  def available?
    return !@__in_use
  end # def avialable?
end # module FTW::Poolable

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
ftw-0.0.29 lib/ftw/poolable.rb
ftw-0.0.28 lib/ftw/poolable.rb
ftw-0.0.27 lib/ftw/poolable.rb
ftw-0.0.26 lib/ftw/poolable.rb
ftw-0.0.25 lib/ftw/poolable.rb
ftw-0.0.24 lib/ftw/poolable.rb
ftw-0.0.23 lib/ftw/poolable.rb
ftw-0.0.22 lib/ftw/poolable.rb
ftw-0.0.21 lib/ftw/poolable.rb
ftw-0.0.20 lib/ftw/poolable.rb
ftw-0.0.19 lib/ftw/poolable.rb
ftw-0.0.18 lib/ftw/poolable.rb
ftw-0.0.17 lib/ftw/poolable.rb
ftw-0.0.16 lib/ftw/poolable.rb
ftw-0.0.15 lib/ftw/poolable.rb
ftw-0.0.14 lib/ftw/poolable.rb
ftw-0.0.13 lib/ftw/poolable.rb
ftw-0.0.11 lib/ftw/poolable.rb
ftw-0.0.10 lib/ftw/poolable.rb
ftw-0.0.9 lib/ftw/poolable.rb