class Apps::Gmail::Schema::Event
Attributes
end_date[RW]
location[RW]
name[RW]
start_date[RW]
Public Instance Methods
add_action_for(response, **attrs)
click to toggle source
# File lib/apps/gmail/schema/event.rb, line 33 def add_action_for(response, **attrs) RsvpAction.new(response: response, **attrs).tap do |action| actions << action end end
build_location(**attrs)
click to toggle source
# File lib/apps/gmail/schema/event.rb, line 21 def build_location(**attrs) self.location = Place.new(**attrs).tap do |place| place.build_address unless place.address end end
build_rsvp_actions()
click to toggle source
# File lib/apps/gmail/schema/event.rb, line 27 def build_rsvp_actions actions.clear %w[Yes No Maybe].map { |response| add_action_for(response) } end
serialize()
click to toggle source
Calls superclass method
# File lib/apps/gmail/schema/event.rb, line 12 def serialize super.merge( "name" => name, "startDate" => start_date, "endDate" => end_date, "location" => location&.serialize ) end