Sha256: dc3af57a31322a06984d845e61b603c8c85976cbacf62e085683de56ec0e2f46
Contents?: true
Size: 360 Bytes
Versions: 2
Compression:
Stored size: 360 Bytes
Contents
## Array#extract_options! require 'facets/array/extract_options' Extracts options from a set of arguments. Removes and returns the last element in the array if it's a hash, otherwise returns a blank hash. def options(*args) args.extract_options! end options(1, 2).assert == {} options(1, 2, :a => :b).assert == {:a=>:b}
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
facets-glimmer-3.2.0 | demo/core/array/extract_options.md |
facets-3.1.0 | demo/core/array/extract_options.md |