Class: Montrose::Frequency::Yearly

Inherits:
Montrose::Frequency show all
Defined in:
lib/montrose/frequency/yearly.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/yearly.rb', line 5

def include?(time)
  matches_interval? time.year - @starts.year
end