mbklein / confstruct

Yet another hash/struct-like configuration object for Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add HashWithStructAccess#has? and HashWithStructAccess#lookup

mbklein opened this issue · comments

h.has?('foo.bar.baz') # true if the full path to the key exists, false if it doesn't
h.lookup('foo.bar.baz') # returns the result if it exists, nil if it doesn't

Implementing #lookup as #lookup! to avoid polluting the namespace

Fixed in commit 4020c35