Module: RubyTorrent::ArrayToH

Defined in:
lib/rubytorrent/typedstruct.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject



19
20
21
# File 'lib/rubytorrent/typedstruct.rb', line 19

def to_h
  inject({}) { |h, (k, v)| h[k] = v; h } # found this neat trick on the internet
end