struct TandaCLI::Models::ShiftSummary

Included Modules

Defined in:

tanda_cli/models/shift_summary.cr
tanda_cli/models/shift_summary/classified_shift.cr
tanda_cli/models/shift_summary/leave_shift.cr
tanda_cli/models/shift_summary/worked_shift.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(shifts : Array(Types::Shift), treat_paid_breaks_as_unpaid : Bool = false, regular_hours_schedules : Array(RegularHoursSchedule) | Nil = nil) #

[View source]

Instance Method Detail

def any_ongoing? : Bool #

[View source]
def each(& : ClassifiedShift -> ) : Nil #

Must yield this collection's elements to the block.


[View source]
def empty? : Bool #

Returns true if self does not contain any element.

([] of Int32).empty? # => true
([1]).empty?         # => false
[nil, false].empty?  # => false
  • #present? returns the inverse.

[View source]
def leave_shifts : Array(LeaveShift) #

[View source]
def leave_time : Time::Span #

[View source]
def representer : Representers::ShiftSummary #

[View source]
def time_left : Time::Span | Nil #

[View source]
def worked_shifts : Array(WorkedShift) #

[View source]
def worked_time : Time::Span #

[View source]