Sha256: 595d7b86d748ac733809115e74c8e4fbc4fa71e72b27edaf917b4f5662000b26
Contents?: true
Size: 682 Bytes
Versions: 5
Compression:
Stored size: 682 Bytes
Contents
module Bot module Message class Card < Base def initialize(to, url, text, suggested_responses=false, options={}) icon = options.delete("icon") self.message = { 'type' => 'link', 'to' => to, 'url' => url, 'title' => "", # Displays over the image 'text' => text, # Displays under the image 'attribution' => { 'name' => text # Displays in bottom line }, }.merge(options) self.message['picUrl'] = icon if icon self.message['attribution']['iconUrl'] = icon if icon self.suggested_responses = suggested_responses end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bot-0.0.43 | lib/bot/messages/card.rb |
bot-0.0.42 | lib/bot/messages/card.rb |
bot-0.0.41 | lib/bot/messages/card.rb |
bot-0.0.40 | lib/bot/messages/card.rb |
bot-0.0.39 | lib/bot/messages/card.rb |