module Cabin::Mixins::Timestamp
Timestamp events before publishing.
Public Class Methods
extended(instance)
click to toggle source
# File lib/cabin/mixins/timestamp.rb, line 5 def self.extended(instance) self.included(instance.class) end
included(klass)
click to toggle source
# File lib/cabin/mixins/timestamp.rb, line 8 def self.included(klass) klass.action do |event| event[:timestamp] = Time.now.strftime("%Y-%m-%dT%H:%M:%S.%6N%z") end end