Class: LibTAD::Tides::Tide

Inherits:
Object
  • Object
show all
Defined in:
lib/types/tides/tide.rb

Overview

Information about the tide at a specific point in time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Tide

Returns a new instance of Tide.



18
19
20
21
22
# File 'lib/types/tides/tide.rb', line 18

def initialize(hash)
  @time = ::LibTAD::TADTime::TADTime.new hash.fetch('time', nil)
  @amplitude = hash.fetch('amplitude', nil)
  @phase = hash.fetch('phase', nil)
end

Instance Attribute Details

#amplitudeFloat (readonly)

The elevation of tidal water above or below mean sea level.

Returns:

  • (Float)


12
13
14
# File 'lib/types/tides/tide.rb', line 12

def amplitude
  @amplitude
end

#phaseTidalPhase (readonly)

The current tidal phase.

Returns:

  • (TidalPhase)


16
17
18
# File 'lib/types/tides/tide.rb', line 16

def phase
  @phase
end

#time::LibTAD::TADTime::TADTime (readonly)

Date/time of the specific tidal data point.



8
9
10
# File 'lib/types/tides/tide.rb', line 8

def time
  @time
end