class FyipeListener
Public Class Methods
new(eventId, options)
click to toggle source
# File lib/fyipe/fyipeListener.rb, line 5 def initialize(eventId, options) # start the timeline manager @timelineObj = FyipeTimelineManager.new(options) @currentEventId = eventId @utilObj = Util.new(options) end
Public Instance Methods
clearTimeline(eventId)
click to toggle source
# File lib/fyipe/fyipeListener.rb, line 35 def clearTimeline(eventId) # set a new eventId @currentEventId = eventId # this will reset the state of the timeline array return @timelineObj.clearTimeline() end
getTimeline()
click to toggle source
# File lib/fyipe/fyipeListener.rb, line 30 def getTimeline() # this always get the current state of the timeline array return @timelineObj.getTimeline() end
logCustomTimelineEvent(timelineObj)
click to toggle source
# File lib/fyipe/fyipeListener.rb, line 23 def logCustomTimelineEvent(timelineObj) timelineObj["eventId"] = @currentEventId # add timeline to the stack @timelineObj.addToTimeline(timelineObj) end
logErrorEvent(content, category = 'exception')
click to toggle source
# File lib/fyipe/fyipeListener.rb, line 12 def logErrorEvent(content, category = 'exception') timelineObj = {} timelineObj["category"]= category timelineObj["data"]= content timelineObj["type"]= @utilObj.getErrorType('ERROR') timelineObj["eventId"]= @currentEventId # add timeline to the stack @timelineObj.addToTimeline(timelineObj) end