class Kounta::Shift
Public Class Methods
new(hash = {})
click to toggle source
Calls superclass method
Kounta::Resource::new
# File lib/kounta/shift.rb, line 14 def initialize(hash = {}) super(hash) self.breaks ||= [] end
Public Instance Methods
to_hash()
click to toggle source
Calls superclass method
Kounta::Resource#to_hash
# File lib/kounta/shift.rb, line 19 def to_hash returning = {} returning[:breaks] = breaks.map(&:to_hash) if breaks && !breaks.empty? super(returning) end