Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/aladdin/support/core_ext/hash.rb

Overview

See Also:

Direct Known Subclasses

Aladdin::Config

Instance Method Summary collapse

Instance Method Details

#to_structStruct

Returns a struct representation of the receiver.

Returns:

  • (Struct)

    struct



7
8
9
# File 'lib/aladdin/support/core_ext/hash.rb', line 7

def to_struct
  Struct.new( *(k = keys) ).new( *values_at( *k ) )
end