class Slot
Slots objects make up the ScheduleGrid input.
Attributes
col[RW]
endDate[RW]
ids[RW]
isNight[RW]
personID[RW]
phase[RW]
row[RW]
startDate[RW]
status[RW]
weight[RW]
Public Class Methods
attr_accessor(*vars)
click to toggle source
Calls superclass method
# File lib/gthc/olson/slot.rb, line 31 def self.attr_accessor(*vars) @attributes ||= [] @attributes.concat vars super(*vars) end
attributes()
click to toggle source
# File lib/gthc/olson/slot.rb, line 37 def self.attributes @attributes end
new(personID, startDate, endDate, phase, isNight, status, row, col, weight=1)
click to toggle source
# File lib/gthc/olson/slot.rb, line 12 def initialize(personID, startDate, endDate, phase, isNight, status, row, col, weight=1) @personID = personID @startDate = startDate @endDate = endDate @phase = phase @isNight = isNight @status = status @row = row @col = col @weight = 1 @ids = nil end
Public Instance Methods
attributes()
click to toggle source
# File lib/gthc/olson/slot.rb, line 41 def attributes self.class.attributes end
to_hash()
click to toggle source
# File lib/gthc/olson/slot.rb, line 25 def to_hash hash = {} instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) } hash end