lib/rising_dragon/event.rb in rising_dragon-0.3.0 vs lib/rising_dragon/event.rb in rising_dragon-0.3.1

- old
+ new

@@ -5,7 +5,16 @@ @id = id @type = type @timestamp = timestamp @data = data end + + def to_json(*option) + { + id: @id, + type: @type, + timestamp: @timestamp, + data: @data, + }.to_json(*option) + end end end