Class: Puertos::SwellData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_periodObject (readonly)

Returns the value of attribute avg_period.



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

def avg_period
  @avg_period
end

#directionObject (readonly)

Returns the value of attribute direction.



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

def direction
  @direction
end

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#height_unitObject (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_periodObject (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_unitObject (readonly)

Returns the value of attribute period_unit.



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

def period_unit
  @period_unit
end