Module: Erlang::ETF::Extensions::Hash

Defined in:
lib/erlang/etf/extensions/hash.rb

Overview

dictionary dict, KeysAndValues

Dictionaries (hash tables) are expressed via an array of 2-tuples representing the key/value pairs. The KeysAndValues array is mandatory, such that an empty dict is expressed as dict, []. Keys and values may be any term. For example, dict, [{name, <<"Tom">>, 30]}.

See: http://bert-rpc.org/

Instance Method Summary collapse

Instance Method Details

#__erlang_evolve__Object



21
22
23
24
25
# File 'lib/erlang/etf/extensions/hash.rb', line 21

def __erlang_evolve__
  ::Erlang::Tuple[:bert, :dict, map do |(key, value)|
    ::Erlang::Tuple[key, value]
  end].__erlang_evolve__
end

#__erlang_type__Object



17
18
19
# File 'lib/erlang/etf/extensions/hash.rb', line 17

def __erlang_type__
  :bert_dict
end