class MaybeLater::Store
Attributes
callbacks[R]
Public Class Methods
instance()
click to toggle source
# File lib/maybe_later/store.rb, line 3 def self.instance Thread.current[:maybe_later_store] ||= new end
new()
click to toggle source
# File lib/maybe_later/store.rb, line 8 def initialize @callbacks = [] end
Public Instance Methods
add_callback(callable)
click to toggle source
# File lib/maybe_later/store.rb, line 12 def add_callback(callable) @callbacks << callable end
clear_callbacks!()
click to toggle source
# File lib/maybe_later/store.rb, line 16 def clear_callbacks! @callbacks = [] end