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.



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

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.



67
68
69
# File 'lib/calendarium-romanum/day.rb', line 67

def colour
  @colour
end

#rankObject (readonly)

Returns the value of attribute rank.



56
57
58
# File 'lib/calendarium-romanum/day.rb', line 56

def rank
  @rank
end

Instance Method Details

#==(other) ⇒ Object



70
71
72
73
74
75
# File 'lib/calendarium-romanum/day.rb', line 70

def ==(other)
  self.class == other.class &&
    title == other.title &&
    rank == other.rank &&
    colour == other.colour
end

#titleObject



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

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