Class: CalendariumRomanum::Colour
- Inherits:
-
Object
- Object
- CalendariumRomanum::Colour
- Defined in:
- lib/calendarium-romanum/enums.rb
Instance Attribute Summary collapse
-
#symbol ⇒ Object
(also: #to_sym)
readonly
Returns the value of attribute symbol.
Instance Method Summary collapse
-
#initialize(symbol) ⇒ Colour
constructor
A new instance of Colour.
- #name ⇒ Object
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
#symbol ⇒ Object (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
#name ⇒ Object
12 13 14 |
# File 'lib/calendarium-romanum/enums.rb', line 12 def name I18n.t @i18n_key end |