class Biz::Schedule
Attributes
configuration[R]
Public Class Methods
new(&config)
click to toggle source
# File lib/biz/schedule.rb, line 8 def initialize(&config) @configuration = Configuration.new(&config) end
Public Instance Methods
&(other)
click to toggle source
# File lib/biz/schedule.rb, line 57 def &(other) self.class.new(&(configuration & other.configuration)) end
dates()
click to toggle source
# File lib/biz/schedule.rb, line 25 def dates Dates.new(self) end
Also aliased as: date
in_hours?(time)
click to toggle source
# File lib/biz/schedule.rb, line 39 def in_hours?(time) Calculation::Active.new(self, time).result end
Also aliased as: business_hours?
in_zone()
click to toggle source
# File lib/biz/schedule.rb, line 53 def in_zone Time.new(time_zone) end
on_break?(time)
click to toggle source
# File lib/biz/schedule.rb, line 45 def on_break?(time) Calculation::OnBreak.new(self, time).result end
on_holiday?(time)
click to toggle source
# File lib/biz/schedule.rb, line 49 def on_holiday?(time) Calculation::OnHoliday.new(self, time).result end
periods()
click to toggle source
# File lib/biz/schedule.rb, line 21 def periods Periods::Proxy.new(self) end
time(scalar, unit)
click to toggle source
# File lib/biz/schedule.rb, line 31 def time(scalar, unit) Calculation::ForDuration.with_unit(self, scalar, unit) end
within(origin, terminus)
click to toggle source
# File lib/biz/schedule.rb, line 35 def within(origin, terminus) Calculation::DurationWithin.new(self, TimeSegment.new(origin, terminus)) end