class Decoplan::DiveProfile
Attributes
levels[RW]
name[RW]
Public Class Methods
new(name: nil)
click to toggle source
# File lib/decoplan/dive_profile.rb, line 6 def initialize(name: nil) @name = name @levels = [] end
Public Instance Methods
apply(algorithm, *params)
click to toggle source
# File lib/decoplan/dive_profile.rb, line 18 def apply(algorithm, *params) algorithm.new(self, *params) end
level(depth:, time:)
click to toggle source
# File lib/decoplan/dive_profile.rb, line 11 def level(depth:, time:) levels.push({ depth: depth, time: time, }) end