Class: TezosClient::Tools::ConvertToHash::BigMap

Inherits:
Base
  • Object
show all
Defined in:
lib/tezos_client/tools/convert_to_hash/big_map.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #type

Instance Method Summary collapse

Methods inherited from Base

#initialize, #value

Constructor Details

This class inherits a constructor from TezosClient::Tools::ConvertToHash::Base

Instance Method Details

#decodeObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/tezos_client/tools/convert_to_hash/big_map.rb', line 9

def decode
  if data.is_a? Hash
    ::TezosClient::BigMap.new(
      var_name,
      data[:int],
      type[:args].second,
      type[:args].first
    )
  else
    TezosClient::Tools::ConvertToHash::Map.new(
      data: data,
      type: type
    ).value[var_name]
  end
end