Module: Caffeinate::Dripper::Drip::ClassMethods
- Defined in:
- lib/caffeinate/dripper/drip.rb
Instance Method Summary collapse
-
#drip(action_name, options = {}, &block) ⇒ Object
Register a drip on the Dripper.
-
#drip_collection ⇒ Object
A collection of Drip objects associated with a given
Caffeinate::Dripper. -
#drips ⇒ Object
A collection of Drip objects associated with a given
Caffeinate::Dripper.
Instance Method Details
#drip(action_name, options = {}, &block) ⇒ Object
Register a drip on the Dripper
drip :mailer_action_name, mailer_class: "MailerClass", step: 1, delay: 1.hour
34 35 36 |
# File 'lib/caffeinate/dripper/drip.rb', line 34 def drip(action_name, = {}, &block) drip_collection.register(action_name, , &block) end |
#drip_collection ⇒ Object
A collection of Drip objects associated with a given Caffeinate::Dripper
15 16 17 |
# File 'lib/caffeinate/dripper/drip.rb', line 15 def drip_collection @drip_collection ||= DripCollection.new(self) end |
#drips ⇒ Object
A collection of Drip objects associated with a given Caffeinate::Dripper
20 21 22 |
# File 'lib/caffeinate/dripper/drip.rb', line 20 def drips drip_collection.values end |