Sha256: 7be8aa86e9fca428067a248cd72384f3cc0807c694671e4169f7923bd6df72dd
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
2014-03-21 Version 2.0.0 XKeys can now be used with data types other than array or hash (as long as they support array- or hash-like interfaces). New custom nodes can be generated by defining an #xkeys_new method. The method is responsible for adding XKeys extensions to the new node as needed/desired. See Sarah::XK in gem sarah-xk for an example. Using :[] (push mode) as the first of multiple keys now works correctly. 2013-07-25 Version 1.0.1 The auto-indexing array key for set has been changed from nil to :[] in order to support nil keys (e.g. in case a NULL value from a database field is being used as a nil key). Get and set now have compatible syntax so that you can use ||=: root[key1, ..., keyN[, option_hash]] root[key1, ..., keyN[, option_hash]] = value root = {}.extend XKeys::Hash root[:top, :[], :[] => false] ||= 'just because' # root => { :top => { :[] => 'just because' } } Note that a leading nil is no longer ignored on get. Use array[int1, int2, {}] to avoid array[start, length] slice interpretation. Option :raise => true raises a KeyError or IndexError on a missing value. Option :raise => *parameters raises the specified exception, e.g. :raise => RuntimeError or :raise => [RuntimeError, 'SNAFU']. The :else option defaults to nil on get. Use :raise to force an exception. 2013-07-08 Version 0.0.2 Packaging and documentation cleanup. 2013-07-08 Version 0.0.1 First release.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xkeys-2.0.0 | HISTORY.txt |