Class: MudratProjector::Projection::SequenceEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/mudrat_projector/projection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#batch_idObject

Returns the value of attribute batch_id

Returns:

  • (Object)

    the current value of batch_id



5
6
7
# File 'lib/mudrat_projector/projection.rb', line 5

def batch_id
  @batch_id
end

#transactionObject

Returns the value of attribute transaction

Returns:

  • (Object)

    the current value of transaction



5
6
7
# File 'lib/mudrat_projector/projection.rb', line 5

def transaction
  @transaction
end

Instance Method Details

#<=>(other_entry) ⇒ Object



10
11
12
# File 'lib/mudrat_projector/projection.rb', line 10

def <=> other_entry
  sort_key <=> other_entry.sort_key
end

#sort_keyObject



6
7
8
# File 'lib/mudrat_projector/projection.rb', line 6

def sort_key
  [transaction.date, batch_id]
end