Class: Rack::Lock::Proxy
- Inherits:
-
Struct
- Object
- Struct
- Rack::Lock::Proxy
- Defined in:
- lib/rack/lock.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#mutex ⇒ Object
Returns the value of attribute mutex.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
Instance Attribute Details
#mutex ⇒ Object
Returns the value of attribute mutex
5 6 7 |
# File 'lib/rack/lock.rb', line 5 def mutex @mutex end |
#target ⇒ Object
Returns the value of attribute target
5 6 7 |
# File 'lib/rack/lock.rb', line 5 def target @target end |
Instance Method Details
#close ⇒ Object
10 11 12 13 14 |
# File 'lib/rack/lock.rb', line 10 def close target.close if target.respond_to?(:close) ensure mutex.unlock end |
#each ⇒ Object
6 7 8 |
# File 'lib/rack/lock.rb', line 6 def each target.each { |x| yield x } end |
#respond_to?(sym) ⇒ Boolean
20 21 22 |
# File 'lib/rack/lock.rb', line 20 def respond_to?(sym) sym.to_sym == :close || target.respond_to?(sym) end |
#to_path ⇒ Object
16 17 18 |
# File 'lib/rack/lock.rb', line 16 def to_path target.to_path end |