class Apps::Outlook::Schema::Section
See: docs.microsoft.com/en-us/outlook/actionable-messages/card-reference#section-fields
Attributes
activity_image[RW]
activity_subtitle[RW]
activity_text[RW]
activity_title[RW]
hero_image[RW]
hero_title[RW]
start_group[RW]
text[RW]
title[RW]
Public Instance Methods
add_fact(name, value)
click to toggle source
# File lib/apps/outlook/schema/section.rb, line 42 def add_fact(name, value) facts[name] = value end
add_image(url, title: nil)
click to toggle source
# File lib/apps/outlook/schema/section.rb, line 46 def add_image(url, title: nil) images[url] = title end
facts()
click to toggle source
Hash of key/value pairs displayed to call out specific points
# File lib/apps/outlook/schema/section.rb, line 18 def facts @facts ||= {} end
images()
click to toggle source
Photo gallery (URL => title)
# File lib/apps/outlook/schema/section.rb, line 23 def images @images ||= {} end
serialize()
click to toggle source
Calls superclass method
# File lib/apps/outlook/schema/section.rb, line 27 def serialize super.merge( "title" => title, "startGroup" => start_group, "activityTitle" => activity_title, "activitySubtitle" => activity_subtitle, "activityText" => activity_text, "activityImage" => activity_image, "heroImage" => hero_image && serialize_image(hero_image => hero_title, key: 'image', value: 'title'), "text" => text, "facts" => serialize_hash(facts), "images" => serialize_hash(images, key: 'image', value: 'title') ) end