Class: CalendariumRomanum::Temporale::Extensions::DedicationBeforeAllSaints

Inherits:
Object
  • Object
show all
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.

Examples:

# It can be used either this way
temporale = Temporale.new(2015, extensions: [
  Temporale::Extensions::DedicationBeforeAllSaints
])

# Or, if you want to customize celebration title and/or symbol:
temporale = Temporale.new(2015, extensions: [
  Temporale::Extensions::DedicationBeforeAllSaints.new(title: 'Title', symbol: :symbol)
])

Since:

  • 0.8.0

Constant Summary collapse

DEFAULT_TITLE =

Since:

  • 0.8.0

proc { I18n.t('temporale.extension.dedication') }
DEFAULT_SYMBOL =

Since:

  • 0.8.0

:dedication

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: DEFAULT_TITLE, symbol: DEFAULT_SYMBOL) ⇒ DedicationBeforeAllSaints

Returns a new instance of DedicationBeforeAllSaints.

Since:

  • 0.8.0



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

Parameters:

  • year (Integer)

    liturgical year

Returns:

  • (Date)

Since:

  • 0.8.0



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.

Yields:

Since:

  • 0.8.0



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.

Yields:

Since:

  • 0.8.0



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