class Sinatra::StrongParameters::IndifferentHash
Public Class Methods
new(attributes = nil)
click to toggle source
Calls superclass method
# File lib/sinatra/strong_parameters.rb, line 11 def initialize(attributes = nil) super update(attributes) unless attributes.nil? end
Public Instance Methods
slice(*keys)
click to toggle source
# File lib/sinatra/strong_parameters.rb, line 16 def slice(*keys) keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true) keys.each_with_object(self.class.new) { |k, hash| hash[k] = self[k] if has_key?(k) } end