Class: CalendariumRomanum::Celebration

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/calendarium-romanum/day.rb

Overview

information on one particular celebration of the liturgical year (like a Sunday, feast or memorial); some days have no (ferial office is used), some have one, some have more among which one may and may not be chosen

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title = '', rank = Ranks::FERIAL, colour = Colours::GREEN) ⇒ Celebration

Returns a new instance of Celebration.


42
43
44
45
46
# File 'lib/calendarium-romanum/day.rb', line 42

def initialize(title='', rank=Ranks::FERIAL, colour=Colours::GREEN)
  @title = title
  @rank = rank
  @colour = colour
end

Instance Attribute Details

#colourObject (readonly) Also known as: color

Returns the value of attribute colour


59
60
61
# File 'lib/calendarium-romanum/day.rb', line 59

def colour
  @colour
end

#rankObject (readonly)

Returns the value of attribute rank


48
49
50
# File 'lib/calendarium-romanum/day.rb', line 48

def rank
  @rank
end

Instance Method Details

#titleObject


51
52
53
54
55
56
57
# File 'lib/calendarium-romanum/day.rb', line 51

def title
  if @title.respond_to? :call
    @title.call
  else
    @title
  end
end