Module: HotTub::Reaper::Mixin
Overview
Mixin to dry up Reaper usage
Instance Attribute Summary collapse
-
#reap_timeout ⇒ Object
readonly
Returns the value of attribute reap_timeout.
-
#reaper ⇒ Object
Returns the value of attribute reaper.
-
#shutdown ⇒ Object
readonly
Returns the value of attribute shutdown.
Instance Method Summary collapse
Instance Attribute Details
#reap_timeout ⇒ Object (readonly)
Returns the value of attribute reap_timeout.
53 54 55 |
# File 'lib/hot_tub/reaper.rb', line 53 def reap_timeout @reap_timeout end |
#reaper ⇒ Object
Returns the value of attribute reaper.
53 54 55 |
# File 'lib/hot_tub/reaper.rb', line 53 def reaper @reaper end |
#shutdown ⇒ Object (readonly)
Returns the value of attribute shutdown.
53 54 55 |
# File 'lib/hot_tub/reaper.rb', line 53 def shutdown @shutdown end |
Instance Method Details
#kill_reaper ⇒ Object
71 72 73 74 75 76 |
# File 'lib/hot_tub/reaper.rb', line 71 def kill_reaper if @reaper @reaper.shutdown @reaper = nil if @shutdown end end |
#reap! ⇒ Object
67 68 69 |
# File 'lib/hot_tub/reaper.rb', line 67 def reap! raise NoMethodError.new('#reap! must be redefined in your class') end |
#spawn_reaper ⇒ Object
78 79 80 |
# File 'lib/hot_tub/reaper.rb', line 78 def spawn_reaper Reaper.spawn(self) end |