Class: Montrose::Frequency::Weekly

Inherits:
Montrose::Frequency show all
Defined in:
lib/montrose/frequency/weekly.rb

Constant Summary

Constants inherited from Montrose::Frequency

FREQUENCY_KEYS, FREQUENCY_TERMS

Instance Attribute Summary

Attributes inherited from Montrose::Frequency

#starts, #time

Instance Method Summary collapse

Methods inherited from Montrose::Frequency

assert, from_options, #initialize, #matches_interval?

Methods included from Rule

#advance!, #continue?, included

Constructor Details

This class inherits a constructor from Montrose::Frequency

Instance Method Details

#include?(time) ⇒ Boolean

Returns:

  • (Boolean)

5
6
7
# File 'lib/montrose/frequency/weekly.rb', line 5

def include?(time)
  (weeks_since_start(time) % @interval).zero?
end