Sha256: fd343327c6521ff5e433c7fada0d5e40839362a0ca79c642ea7d9b983afca3b6

Contents?: true

Size: 387 Bytes

Versions: 5

Compression:

Stored size: 387 Bytes

Contents

module RisingDragon
  class Event
    attr_reader :id, :type, :timestamp, :data
    def initialize(id:, type:, timestamp:, data:)
      @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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rising_dragon-0.5.0 lib/rising_dragon/event.rb
rising_dragon-0.3.4 lib/rising_dragon/event.rb
rising_dragon-0.3.3 lib/rising_dragon/event.rb
rising_dragon-0.3.2 lib/rising_dragon/event.rb
rising_dragon-0.3.1 lib/rising_dragon/event.rb