Class: Daylight::AngleRatio

Inherits:
Object
  • Object
show all
Defined in:
lib/trigger_switch_d/daylight.rb

Overview

Holds angle ratio per degree

Instance Method Summary collapse

Constructor Details

#initialize(angle) ⇒ AngleRatio

:nodoc:all



61
62
63
# File 'lib/trigger_switch_d/daylight.rb', line 61

def initialize(angle)
  @ratio = angle.to_f/360.0
end

Instance Method Details

#to_fObject



64
65
66
# File 'lib/trigger_switch_d/daylight.rb', line 64

def to_f
  @ratio
end