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.49 lib/ftw/poolable.rb
ftw-0.0.48 lib/ftw/poolable.rb
ftw-0.0.47 lib/ftw/poolable.rb
ftw-0.0.46 lib/ftw/poolable.rb
ftw-0.0.45 lib/ftw/poolable.rb
ftw-0.0.44 lib/ftw/poolable.rb
ftw-0.0.43 lib/ftw/poolable.rb
ftw-0.0.42 lib/ftw/poolable.rb
ftw-0.0.41 lib/ftw/poolable.rb
ftw-0.0.40 lib/ftw/poolable.rb
ftw-0.0.39 lib/ftw/poolable.rb
ftw-0.0.38 lib/ftw/poolable.rb
ftw-0.0.37 lib/ftw/poolable.rb
ftw-0.0.36 lib/ftw/poolable.rb
ftw-0.0.35 lib/ftw/poolable.rb
ftw-0.0.34 lib/ftw/poolable.rb
ftw-0.0.33 lib/ftw/poolable.rb
ftw-0.0.32 lib/ftw/poolable.rb
ftw-0.0.31 lib/ftw/poolable.rb
ftw-0.0.30 lib/ftw/poolable.rb