Class: RisingDragon::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/rising_dragon/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, type:, timestamp:, data:) ⇒ Event

Returns a new instance of Event.



4
5
6
7
8
9
# File 'lib/rising_dragon/event.rb', line 4

def initialize(id:, type:, timestamp:, data:)
  @id = id
  @type = type
  @timestamp = timestamp
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/rising_dragon/event.rb', line 3

def data
  @data
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/rising_dragon/event.rb', line 3

def id
  @id
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



3
4
5
# File 'lib/rising_dragon/event.rb', line 3

def timestamp
  @timestamp
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/rising_dragon/event.rb', line 3

def type
  @type
end