class TimePricing::Base

Attributes

config[R]

Public Class Methods

new(config) click to toggle source
# File lib/time_pricing/base.rb, line 5
def initialize(config)
  @config = config
end

Public Instance Methods

add_plan!(**args) click to toggle source
# File lib/time_pricing/base.rb, line 13
def add_plan!(**args)
  @config.add_plan!(**args)
end
combine_plans?() click to toggle source
# File lib/time_pricing/base.rb, line 21
def combine_plans?
  @config.combine_plans?
end
for_duration(duration) click to toggle source
# File lib/time_pricing/base.rb, line 29
def for_duration(duration)
  Calculation.new(config).for_duration(duration)
end
for_time(start_time, end_time) click to toggle source
# File lib/time_pricing/base.rb, line 25
def for_time(start_time, end_time)
  Calculation.new(config).for_time(start_time, end_time)
end
plans() click to toggle source
# File lib/time_pricing/base.rb, line 9
def plans
  @config.plans
end
remove_plan!(name) click to toggle source
# File lib/time_pricing/base.rb, line 17
def remove_plan!(name)
  @config.remove_plan!(name)
end