class Preact::Event
Attributes
account[RW]
external_identifier[RW]
extras[RW]
link_url[RW]
links[RW]
name[RW]
note[RW]
revenue[RW]
target_id[RW]
thumb_url[RW]
timestamp[RW]
Public Instance Methods
add_link(name, href)
click to toggle source
# File lib/preact/objects/event.rb, line 8 def add_link(name, href) self.links ||= [] self.links << ActionLink.new({ :name => name, :href => href }) end
as_json(options={})
click to toggle source
# File lib/preact/objects/event.rb, line 13 def as_json(options={}) { :klass => "actionevent", :name => self.name, :timestamp => self.timestamp, :account => self.account, :revenue => self.revenue, :source => Preact.configuration.user_agent, # version of this logging library :note => self.note, :external_identifier => self.target_id || self.external_identifier, :extras => self.extras, :links => self.links.nil? ? nil : self.links.as_json, :thumb_url => self.thumb_url, :link_url => self.link_url } end