module UltraMarathon::Callbacks
Private Instance Methods
callback_conditions_met?(options)
click to toggle source
Check if the options' hash of conditions are met. Supports :if, :unless with callable objects/symbols
# File lib/ultra_marathon/callbacks.rb, line 16 def callback_conditions_met?(options) conditions_met = true if options.key? :if conditions_met &&= contexticute(options[:if]) elsif options.key? :unless conditions_met &&= !contexticute(options[:unless]) end conditions_met end