Class: CalendariumRomanum::Colour

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

Returns a new instance of Colour.


4
5
6
7
# File 'lib/calendarium-romanum/enums.rb', line 4

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

Instance Attribute Details

#symbolObject (readonly) Also known as: to_sym

Returns the value of attribute symbol


9
10
11
# File 'lib/calendarium-romanum/enums.rb', line 9

def symbol
  @symbol
end

Instance Method Details

#nameObject


12
13
14
# File 'lib/calendarium-romanum/enums.rb', line 12

def name
  I18n.t @i18n_key
end