Class: CalendariumRomanum::Temporale::Extensions::DedicationBeforeAllSaints
- Inherits:
-
Object
- Object
- CalendariumRomanum::Temporale::Extensions::DedicationBeforeAllSaints
- Defined in:
- lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb
Overview
CalendariumRomanum::Temporale extension adding solemnity of dedication of a church celebrated on the Sunday before All Saints / last October Sunday.
In churches, whose actual day of consecration is unknown, the anniversary of consecration is celebrated either on October 25th, or on the Sunday before All Saints (cf. Notitiae 71/1972, p. 103). This extension implements the latter case.
Constant Summary collapse
- DEFAULT_TITLE =
proc { I18n.t('temporale.extension.dedication') }
- DEFAULT_SYMBOL =
:dedication
Class Method Summary collapse
-
.dedication(year) ⇒ Date
Computes date of the solemnity.
- .each_celebration {|Symbol, Celebration| ... } ⇒ void
Instance Method Summary collapse
- #each_celebration {|Symbol, Celebration| ... } ⇒ void
-
#initialize(title: DEFAULT_TITLE, symbol: DEFAULT_SYMBOL) ⇒ DedicationBeforeAllSaints
constructor
A new instance of DedicationBeforeAllSaints.
Constructor Details
#initialize(title: DEFAULT_TITLE, symbol: DEFAULT_SYMBOL) ⇒ DedicationBeforeAllSaints
Returns a new instance of DedicationBeforeAllSaints.
52 53 54 55 |
# File 'lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb', line 52 def initialize(title: DEFAULT_TITLE, symbol: DEFAULT_SYMBOL) @title = title @symbol = symbol end |
Class Method Details
.dedication(year) ⇒ Date
Computes date of the solemnity
48 49 50 |
# File 'lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb', line 48 def self.dedication(year) DateHelper.sunday_before(Date.new(year + 1, 11, 1)) end |
.each_celebration {|Symbol, Celebration| ... } ⇒ void
This method returns an undefined value.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb', line 31 def self.each_celebration yield( # symbol refers to the date-computing method :dedication, Celebration.new( DEFAULT_TITLE, Ranks::SOLEMNITY_PROPER, Colours::WHITE, DEFAULT_SYMBOL ) ) end |
Instance Method Details
#each_celebration {|Symbol, Celebration| ... } ⇒ void
This method returns an undefined value.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb', line 59 def each_celebration yield( proc {|year| self.class.dedication(year) }, Celebration.new( @title, Ranks::SOLEMNITY_PROPER, Colours::WHITE, @symbol ) ) end |