Class: BahaiDate::Day
- Inherits:
-
Object
- Object
- BahaiDate::Day
- Defined in:
- lib/bahai_date/day.rb
Constant Summary collapse
- TITLES =
%w(Baha Jalal Jamal Azamat Nur Rahmat Kalimat Kamal Asma Izzat Mashiyyat Ilm Qudrat Qawl Masail Sharaf Sultan Mulk Ala)
- TITLES_HTML =
%w(Bahá Jalál Jamál ‘Aẓamat Núr Raḥmat Kalimát Kamál Asmá’ ‘Izzat Ma<u>sh</u>íyyat ‘Ilm Qudrat Qawl Masá’il <u>Sh</u>araf Sulṭán Mulk ‘Alá’)
- TITLES_EN =
%w(Splendour Glory Beauty Grandeur Light Mercy Words Perfection Names Might Will Knowledge Power Speech Questions Honour Sovereignty Dominion Loftiness)
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#occasions ⇒ Object
Returns the value of attribute occasions.
-
#weekday ⇒ Object
Returns the value of attribute weekday.
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(number_arg) ⇒ Day
constructor
A new instance of Day.
- #title ⇒ Object
- #to_s ⇒ Object
- #translation ⇒ Object
Constructor Details
#initialize(number_arg) ⇒ Day
Returns a new instance of Day.
10 11 12 13 |
# File 'lib/bahai_date/day.rb', line 10 def initialize(number_arg) validate number_arg @number = number_arg.to_i end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
7 8 9 |
# File 'lib/bahai_date/day.rb', line 7 def number @number end |
#occasions ⇒ Object
Returns the value of attribute occasions.
8 9 10 |
# File 'lib/bahai_date/day.rb', line 8 def occasions @occasions end |
#weekday ⇒ Object
Returns the value of attribute weekday.
8 9 10 |
# File 'lib/bahai_date/day.rb', line 8 def weekday @weekday end |
Instance Method Details
#html ⇒ Object
27 28 29 |
# File 'lib/bahai_date/day.rb', line 27 def html TITLES_HTML[title_index] end |
#title ⇒ Object
19 20 21 |
# File 'lib/bahai_date/day.rb', line 19 def title TITLES[title_index] end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/bahai_date/day.rb', line 15 def to_s title end |
#translation ⇒ Object
23 24 25 |
# File 'lib/bahai_date/day.rb', line 23 def translation TITLES_EN[title_index] end |