Class: Hash
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/yard/core_ext/hash.rb |
Class Method Summary
-
.[](*args)
(also: .create_186)
Alias for .create.
- .create(*args) (also: .[], .[])
-
.create_186(*args)
Alias for .[].
Class Method Details
.[](*args) Also known as: .create_186
Alias for .create.
# 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 .[].
# File 'lib/yard/core_ext/hash.rb', line 13
alias create_186 []