Module: Replay::EventDecorator
- Defined in:
- lib/replay/event_decorator.rb
Overview
hook class to apply global decorators to events
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/replay/event_decorator.rb', line 4 def self.included(base) base.class_eval do include Virtus.value_object attr_accessor :metadata def inspect "#{self.type}: #{self.attributes.map{|k, v| "#{k.to_s} = #{v.to_s}"}.join(", ")}" end def type self.class.to_s end end end |