class Object
Public Instance Methods
Source
# File lib/will_paginate/core_ext.rb, line 8 def except(*keys) rejected = Set.new(respond_to?(:convert_key) ? keys.map { |key| convert_key(key) } : keys) reject { |key,| rejected.include?(key) } end
Returns a new hash without the given keys.
Source
# File lib/will_paginate/core_ext.rb, line 14 def except!(*keys) replace(except(*keys)) end
Replaces the hash without only the given keys.
Source
# File lib/will_paginate/core_ext.rb, line 22 def underscore self.to_s.gsub(/::/, '/'). gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). gsub(/([a-z\d])([A-Z])/,'\1_\2'). tr("-", "_"). downcase end