class Projects::Model::Event
-
This class is used to make an object for
Event
.
Attributes
ampm[RW]
durationHour[RW]
durationMinutes[RW]
hour[RW]
id[RW]
isOpen[RW]
location[RW]
minutes[RW]
occurred[RW]
occurrences[RW]
participants[RW]
reminder[RW]
repeat[RW]
scheduledOn[RW]
scheduledOnLong[RW]
title[RW]
Public Instance Methods
getAMPM()
click to toggle source
getDurationHours()
click to toggle source
getDurationMinutes()
click to toggle source
getHour()
click to toggle source
getId()
click to toggle source
getLocation()
click to toggle source
getMinutes()
click to toggle source
getOccurred()
click to toggle source
getOccurrences()
click to toggle source
getParticipants()
click to toggle source
-
Get the participants.
Returns¶ ↑
-
List of
Participant
object.
# File lib/projects/model/Event.rb, line 269 def getParticipants return @participants end
getReminder()
click to toggle source
getRepeat()
click to toggle source
getScheduledOn()
click to toggle source
getScheduledOnLong()
click to toggle source
getTilte()
click to toggle source
setAMPM(ampm)
click to toggle source
setDurationHours(durationHour)
click to toggle source
setDurationMinutes(durationMinutes)
click to toggle source
setHour(hour)
click to toggle source
setId(id)
click to toggle source
setIsOpen(isOpen)
click to toggle source
setLocation(location)
click to toggle source
setMinutes(minutes)
click to toggle source
setOccurred(occurred)
click to toggle source
setOccurrences(occurrences)
click to toggle source
setParticipants(participants)
click to toggle source
-
Set the participants.
Parameters¶ ↑
- participants
-
List of
Participant
object.
-
# File lib/projects/model/Event.rb, line 259 def setParticipants(participants) @participants = participants end
setReminder(reminder)
click to toggle source
setRepeat(repeat)
click to toggle source
setScheduledOn(scheduledOn)
click to toggle source
setScheduledOnLong(scheduledOnLong)
click to toggle source
setTitle(title)
click to toggle source
toParamMAP()
click to toggle source
-
Convert the
Event
object into HashMap.
Returns¶ ↑
-
HashMap object.
# File lib/projects/model/Event.rb, line 339 def toParamMAP requestBody = Hash.new if title != nil requestBody["title"] = title end if scheduledOn != nil requestBody["date"] = scheduledOn end if hour != nil requestBody["hour"] = hour end if minutes != nil requestBody["minutes"] = minutes end if ampm != nil requestBody["ampm"] = ampm end if durationHour != nil requestBody["duration_hour"] = durationHour end if durationMinutes != nil requestBody["duration_mins"] = durationMinutes end if participants != nil participantIds = "" participants.each do|participant| participantIds += String(participant.getParticipantId)+","; end requestBody["participants"] = participantIds end if reminder != nil requestBody["remind_before"] = reminder end if repeat != nil requestBody["repeat"] = repeat end if occurrences != nil && occurrences.to_i > 1 requestBody["nooftimes_repeat"] = occurrences end if location != nil requestBody["location"] = location end return requestBody end