Class: Object

### Home Classes Methods

### In Files

- lib/will_paginate/core_ext.rb

### Parent

BasicObject

### Methods

- #except
- #except!
- #underscore

### Class/Module Index

Quicksearch

- WillPaginate
- WillPaginate::ActionView
- WillPaginate::ActionView::LinkRenderer
- WillPaginate::ActiveRecord
- WillPaginate::ActiveRecord::BaseMethods
- WillPaginate::ActiveRecord::Pagination
- WillPaginate::ActiveRecord::RelationMethods
- WillPaginate::Collection
- WillPaginate::CollectionMethods
- WillPaginate::DataMapper
- WillPaginate::DataMapper::CollectionMethods
- WillPaginate::DataMapper::Pagination
- WillPaginate::Deprecation
- WillPaginate::Deprecation::Hash
- WillPaginate::I18n
- WillPaginate::InvalidPage
- WillPaginate::Merb
- WillPaginate::Merb::LinkRenderer
- WillPaginate::PageNumber
- WillPaginate::PerPage
- WillPaginate::PerPage::Inheritance
- WillPaginate::Railtie
- WillPaginate::Railtie::ControllerRescuePatch
- WillPaginate::Railtie::ShowExceptionsPatch
- WillPaginate::SequelMethods
- WillPaginate::Sinatra
- WillPaginate::Sinatra::Helpers
- WillPaginate::Sinatra::LinkRenderer
- WillPaginate::ViewHelpers
- WillPaginate::ViewHelpers::LinkRenderer
- WillPaginate::ViewHelpers::LinkRendererBase
- Array
- Object

No matching classes.

# Object

### Public Instance Methods

except(*keys) click to toggle source

Returns a new hash without the given keys.

    # 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

except!(*keys) click to toggle source

Replaces the hash without only the given keys.

    # File lib/will_paginate/core_ext.rb, line 14
    def except!(*keys)
      replace(except(*keys))
    end

underscore() click to toggle 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.