Class: CalendariumRomanum::Celebration
- Inherits:
-
Object
- Object
- CalendariumRomanum::Celebration
- 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
-
#colour ⇒ Object
(also: #color)
readonly
Returns the value of attribute colour.
-
#rank ⇒ Object
readonly
Returns the value of attribute rank.
-
#symbol ⇒ Object
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #change(title: nil, rank: nil, colour: nil, color: nil, symbol: nil) ⇒ Object
-
#initialize(title = '', rank = Ranks::FERIAL, colour = Colours::GREEN, symbol = nil) ⇒ Celebration
constructor
A new instance of Celebration.
- #title ⇒ Object
Constructor Details
#initialize(title = '', rank = Ranks::FERIAL, colour = Colours::GREEN, symbol = nil) ⇒ Celebration
Returns a new instance of Celebration.
59 60 61 62 63 64 |
# File 'lib/calendarium-romanum/day.rb', line 59 def initialize(title = '', rank = Ranks::FERIAL, colour = Colours::GREEN, symbol = nil) @title = title @rank = rank @colour = colour @symbol = symbol end |
Instance Attribute Details
#colour ⇒ Object (readonly) Also known as: color
Returns the value of attribute colour.
77 78 79 |
# File 'lib/calendarium-romanum/day.rb', line 77 def colour @colour end |
#rank ⇒ Object (readonly)
Returns the value of attribute rank.
66 67 68 |
# File 'lib/calendarium-romanum/day.rb', line 66 def rank @rank end |
#symbol ⇒ Object (readonly)
Returns the value of attribute symbol.
80 81 82 |
# File 'lib/calendarium-romanum/day.rb', line 80 def symbol @symbol end |
Instance Method Details
#==(other) ⇒ Object
82 83 84 85 86 87 |
# File 'lib/calendarium-romanum/day.rb', line 82 def ==(other) self.class == other.class && title == other.title && rank == other.rank && colour == other.colour end |
#change(title: nil, rank: nil, colour: nil, color: nil, symbol: nil) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/calendarium-romanum/day.rb', line 89 def change(title: nil, rank: nil, colour: nil, color: nil, symbol: nil) self.class.new( title || self.title, rank || self.rank, colour || color || self.colour, symbol || self.symbol ) end |
#title ⇒ Object
69 70 71 72 73 74 75 |
# File 'lib/calendarium-romanum/day.rb', line 69 def title if @title.respond_to? :call @title.call else @title end end |