class Talkable::Offer
Public Class Methods
parse(result_hash)
click to toggle source
# File lib/talkable/resources/offer.rb, line 3 def self.parse(result_hash) return nil unless result_hash && result_hash[:offer] && result_hash[:offer].size > 0 offer = self.new(result_hash[:offer]) offer.claim_links ||= Hashie::Mash.new(result_hash[:claim_links]) offer end
Public Instance Methods
Protected Instance Methods
default_iframe_options()
click to toggle source
# File lib/talkable/resources/offer.rb, line 29 def default_iframe_options { container: "talkable-offer", } end
render_container_snipet(name)
click to toggle source
# File lib/talkable/resources/offer.rb, line 35 def render_container_snipet(name) "<div id='#{CGI.escape(name)}'></div>" end