Class: Barometer::Data::Sun

Inherits:
Object
  • Object
show all
Defined in:
lib/barometer/data/sun.rb

Instance Method Summary collapse

Instance Method Details

#after_rise?(time) ⇒ Boolean



13
14
15
# File 'lib/barometer/data/sun.rb', line 13

def after_rise?(time)
  time >= rise
end

#before_set?(time) ⇒ Boolean



17
18
19
# File 'lib/barometer/data/sun.rb', line 17

def before_set?(time)
  time <= set
end

#nil?Boolean



9
10
11
# File 'lib/barometer/data/sun.rb', line 9

def nil?
  !(rise || set)
end

#to_sObject



21
22
23
# File 'lib/barometer/data/sun.rb', line 21

def to_s
  [_to_s('rise', rise), _to_s('set', set)].compact.join(', ')
end