Class: CalendariumRomanum::Season

Inherits:
Object
  • Object
show all
Defined in:
lib/calendarium-romanum/enums.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(symbol, colour) ⇒ Season

Returns a new instance of Season.


31
32
33
34
35
# File 'lib/calendarium-romanum/enums.rb', line 31

def initialize(symbol, colour)
  @symbol = symbol
  @colour = colour
  @i18n_key = "temporale.season.#{@symbol}"
end

Instance Attribute Details

#colourObject (readonly)

Returns the value of attribute colour


37
38
39
# File 'lib/calendarium-romanum/enums.rb', line 37

def colour
  @colour
end

#symbolObject (readonly) Also known as: to_sym

Returns the value of attribute symbol


37
38
39
# File 'lib/calendarium-romanum/enums.rb', line 37

def symbol
  @symbol
end

Instance Method Details

#nameObject


40
41
42
# File 'lib/calendarium-romanum/enums.rb', line 40

def name
  I18n.t @i18n_key
end