Class: Hash

Inherits:
Object show all
Defined in:
lib/jstruct/ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_jexpObject



2
3
4
5
6
# File 'lib/jstruct/ext/hash.rb', line 2

def to_jexp
  inject(self::class.new) do |h, (key, value)|
    h.update key.to_s => value.to_jexp
  end
end