Class: Journaled::Change

Inherits:
Object
  • Object
show all
Includes:
Event
Defined in:
app/models/journaled/change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Event

#created_at, #event_type, #id, #journal!, #journaled_attributes, #journaled_partition_key, #journaled_schema_name

Constructor Details

#initialize(table_name:, record_id:, database_operation:, logical_operation:, changes:, journaled_app_name:, actor:) ⇒ Change

rubocop:disable Metrics/ParameterLists



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'app/models/journaled/change.rb', line 19

def initialize(table_name:, # rubocop:disable Metrics/ParameterLists
               record_id:,
               database_operation:,
               logical_operation:,
               changes:,
               journaled_app_name:,
               actor:)
  @table_name = table_name
  @record_id = record_id
  @database_operation = database_operation
  @logical_operation = logical_operation
  @changes = changes
  @journaled_app_name = journaled_app_name
  @actor = actor
end

Instance Attribute Details

#actorObject (readonly)

Returns the value of attribute actor.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def actor
  @actor
end

#changesObject (readonly)

Returns the value of attribute changes.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def changes
  @changes
end

#database_operationObject (readonly)

Returns the value of attribute database_operation.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def database_operation
  @database_operation
end

#journaled_app_nameObject (readonly)

Returns the value of attribute journaled_app_name.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def journaled_app_name
  @journaled_app_name
end

#logical_operationObject (readonly)

Returns the value of attribute logical_operation.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def logical_operation
  @logical_operation
end

#record_idObject (readonly)

Returns the value of attribute record_id.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def record_id
  @record_id
end

#table_nameObject (readonly)

Returns the value of attribute table_name.



4
5
6
# File 'app/models/journaled/change.rb', line 4

def table_name
  @table_name
end