module Aeternitas::PollingFrequency
Stores default polling frequency calculation methods.
Constants
- DAILY
- HOURLY
- MONTHLY
- WEEKLY
Public Class Methods
by_name(name)
click to toggle source
Retrieves the build-in polling frequency methods by name.
@param [Symbol] name the frequency method @return [Lambda] Polling frequency method @raise [ArgumentError] if the preset does not exist
# File lib/aeternitas/polling_frequency.rb, line 14 def self.by_name(name) case name when :hourly then HOURLY when :daily then DAILY when :weekly then WEEKLY when :monthly then MONTHLY else raise(ArgumentError, "Unknown polling frequency: #{name}") end end