123456789_123456789_123456789_123456789_123456789_

Class: Hash

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/yard/core_ext/hash.rb

Class Method Summary

Class Method Details

.[](*args) Also known as: .create_186

Alias for .create.

[ GitHub ]

  
# File 'lib/yard/core_ext/hash.rb', line 14

alias [] create

.create(*args) Also known as: .[], .[]

[ GitHub ]

  
# File 'lib/yard/core_ext/hash.rb', line 4

def create(*args)
  if args.first.is_a?(Array) && args.size == 1
    obj = new
    args.first.each {|k, v| obj[k] = v }
    obj
  else
    create_186(*args)
  end
end

.create_186(*args)

Alias for .[].

[ GitHub ]

  
# File 'lib/yard/core_ext/hash.rb', line 13

alias create_186 []