Class: Puertos::WindData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(speed: nil, direction: nil, unit: 'm/s') ⇒ WindData

Returns a new instance of WindData.



5
6
7
8
9
# File 'lib/wind_data.rb', line 5

def initialize(speed: nil, direction: nil, unit: 'm/s')
  @speed     = speed
  @direction = direction
  @unit      = unit
end

Instance Attribute Details

#directionObject (readonly)

Returns the value of attribute direction.



3
4
5
# File 'lib/wind_data.rb', line 3

def direction
  @direction
end

#speedObject (readonly)

Returns the value of attribute speed.



3
4
5
# File 'lib/wind_data.rb', line 3

def speed
  @speed
end

#unitObject (readonly)

Returns the value of attribute unit.



3
4
5
# File 'lib/wind_data.rb', line 3

def unit
  @unit
end