Class: FFXI::VanaDay
Constant Summary
collapse
- VANA_DAYS =
["Firesday", "Earthsday", "Watersday", "Windsday", "Iceday",
"Lightningday", "Lightsday", "Darksday"]
- DAY_ELEMENTS =
["Fire", "Earth", "Water", "Wind", "Ice", "Thunder",
"Light", "Darkness"]
Constants included
from Constants
Constants::BASIS_DATE, Constants::DAY, Constants::HOUR, Constants::MINUTE, Constants::MOON_DATE, Constants::MS_BASIS_DATE, Constants::MS_BASIS_VANA, Constants::MS_DAY, Constants::MS_GAME_DAY, Constants::MS_HOUR, Constants::MS_MINUTE, Constants::MS_MONTH, Constants::MS_MOON_DATE, Constants::MS_SECOND, Constants::MS_YEAR
Instance Attribute Summary collapse
Instance Method Summary
collapse
#add_listener, #has_listeners?, property, #remove_listener
Constructor Details
#initialize(opts = {}) ⇒ VanaDay
19
20
21
22
23
|
# File 'lib/Vana/day.rb', line 19
def initialize(opts={})
super()
add_listener(opts[:listener]) if opts[:listener]
update_vana_time opts[:vana_time] if opts[:vana_time]
end
|
Instance Attribute Details
#vana_time ⇒ Object
Returns the value of attribute vana_time.
34
35
36
|
# File 'lib/Vana/day.rb', line 34
def vana_time
@vana_time
end
|
Instance Method Details
#to_f ⇒ Object
40
41
42
|
# File 'lib/Vana/day.rb', line 40
def to_f
day.to_f
end
|
#to_i ⇒ Object
36
37
38
|
# File 'lib/Vana/day.rb', line 36
def to_i
day.to_i
end
|
#update_earth_time(time) ⇒ Object
30
31
32
|
# File 'lib/Vana/day.rb', line 30
def update_earth_time(time)
update_vana_time FFXI::Common.earth_to_vana(time)
end
|
#update_vana_time(vt) ⇒ Object
25
26
27
28
|
# File 'lib/Vana/day.rb', line 25
def update_vana_time(vt)
@vana_time = vt.to_f
set_day
end
|