Class: Pikuri::Finalizers::Closer
- Inherits:
-
Struct
- Object
- Struct
- Pikuri::Finalizers::Closer
- Defined in:
- lib/pikuri/finalizers.rb
Overview
Adapts a teardown block to the #close protocol, so a block and a closeable object can share one registry.
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
52 53 54 |
# File 'lib/pikuri/finalizers.rb', line 52 def block @block end |
Instance Method Details
#close ⇒ void
This method returns an undefined value.
54 55 56 |
# File 'lib/pikuri/finalizers.rb', line 54 def close block.call end |