Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/vine.rb
Instance Method Summary collapse
Instance Method Details
#vine(path) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/vine.rb', line 3 def vine(path) ret = self path.split('.').each do |p| if p.to_i.to_s == p ret = ret[p.to_i] else ret = ret[p.to_s] || ret[p.to_sym] end break unless ret end ret end |