Class: EML::UK::Models::TNS::Message

Inherits:
Model
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/eml/uk/models/tns/message.rb

Instance Method Summary collapse

Methods inherited from Model

enumerate_fields, fields, #to_h, #to_json

Constructor Details

#initialize(raw_values) ⇒ Message

Returns a new instance of Message.



14
15
16
17
18
19
20
21
# File 'lib/eml/uk/models/tns/message.rb', line 14

def initialize(raw_values)
  raw_transactions = raw_values.fetch("Transactions", [])
  @transactions = raw_transactions.
    each_with_object([]) do |raw_transaction, transactions|
      transactions << EML::UK::Models::TNS::Transaction.
        new(raw_transaction)
    end
end