Sha256: b3b8e91642e050f272dd98a140029f3f979bfd601229bc9d727fbdbfde74a7b8
Contents?: true
Size: 436 Bytes
Versions: 14
Compression:
Stored size: 436 Bytes
Contents
module MessengerClient class QuickReply def initialize(text, payload=nil, image_url=nil) @text = text @payload = payload @image_url = image_url end def to_json json = { content_type: "text", title: @text } json.merge!(payload: @payload) unless @payload.nil? json.merge!(image_url: @image_url) unless @image_url.nil? json end end end
Version data entries
14 entries across 14 versions & 1 rubygems