Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/yard/core_ext/hash.rb
Direct Known Subclasses
Class Method Summary collapse
- .create(*args) ⇒ Object (also: [])
Class Method Details
.create(*args) ⇒ Object Also known as: []
3 4 5 6 7 8 9 10 11 |
# File 'lib/yard/core_ext/hash.rb', line 3 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 |