Class: TezosClient::Tools::ConvertToHash

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

Instance Method Summary collapse

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/tezos_client/tools/convert_to_hash.rb', line 7

def execute
  case type[:prim]
  when "pair"
    pair_type(data: data, type: type)
  when "list"
    list_type(data: data, type: type)
  when "int"
    int_type(data: data, type: type)
  when "nat"
    int_type(data: data, type: type)
  when "key"
    key_type(data: data, type: type)
  when "timestamp"
    timestamp_type(data: data, type: type)
  when "string"
    string_type(data: data, type: type)
  when "address"
    address_type(data: data, type: type)
  else
    raise "type '#{type[:prim]}' not implemented"
  end
end