Method: Sinatra::IndifferentHash#select

Defined in:
lib/sinatra/indifferent_hash.rb

#select(*args, &block) ⇒ Object



169
170
171
172
173
# File 'lib/sinatra/indifferent_hash.rb', line 169

def select(*args, &block)
  return to_enum(:select) unless block_given?

  dup.tap { |hash| hash.select!(*args, &block) }
end