Method: OrientSupport::Hash#slice
- Defined in:
- lib/support/orient.rb
#slice(arg) ⇒ Object
excepts a regular expression as well
278 279 280 281 282 283 284 |
# File 'lib/support/orient.rb', line 278 def slice arg if arg.is_a? Regexp find_all{ |key| key.to_s.match(arg) }.to_h else super arg.to_sym end end |