Class: Puertos::SwellData
- Inherits:
-
Object
- Object
- Puertos::SwellData
- Defined in:
- lib/swell_data.rb
Instance Attribute Summary collapse
-
#avg_period ⇒ Object
readonly
Returns the value of attribute avg_period.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#height_unit ⇒ Object
readonly
Returns the value of attribute height_unit.
-
#peak_period ⇒ Object
readonly
Returns the value of attribute peak_period.
-
#period_unit ⇒ Object
readonly
Returns the value of attribute period_unit.
Instance Method Summary collapse
-
#initialize(height: nil, height_unit: 'm', direction: nil, avg_period: nil, peak_period: nil, period_unit: 's') ⇒ SwellData
constructor
A new instance of SwellData.
Constructor Details
#initialize(height: nil, height_unit: 'm', direction: nil, avg_period: nil, peak_period: nil, period_unit: 's') ⇒ SwellData
Returns a new instance of SwellData.
5 6 7 8 9 10 11 12 |
# File 'lib/swell_data.rb', line 5 def initialize(height: nil, height_unit: 'm', direction: nil, avg_period: nil, peak_period: nil, period_unit: 's') @height = height @height_unit = height_unit @direction = direction @avg_period = avg_period @peak_period = peak_period @period_unit = period_unit end |
Instance Attribute Details
#avg_period ⇒ Object (readonly)
Returns the value of attribute avg_period.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def avg_period @avg_period end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def direction @direction end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def height @height end |
#height_unit ⇒ Object (readonly)
Returns the value of attribute height_unit.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def height_unit @height_unit end |
#peak_period ⇒ Object (readonly)
Returns the value of attribute peak_period.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def peak_period @peak_period end |
#period_unit ⇒ Object (readonly)
Returns the value of attribute period_unit.
3 4 5 |
# File 'lib/swell_data.rb', line 3 def period_unit @period_unit end |