Class: Puertos::WindData
- Inherits:
-
Object
- Object
- Puertos::WindData
- Defined in:
- lib/wind_data.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#speed ⇒ Object
readonly
Returns the value of attribute speed.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(speed: nil, direction: nil, unit: 'm/s') ⇒ WindData
constructor
A new instance of WindData.
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
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
3 4 5 |
# File 'lib/wind_data.rb', line 3 def direction @direction end |
#speed ⇒ Object (readonly)
Returns the value of attribute speed.
3 4 5 |
# File 'lib/wind_data.rb', line 3 def speed @speed end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
3 4 5 |
# File 'lib/wind_data.rb', line 3 def unit @unit end |