Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

powerpack

> 编程语言
Open source

Some useful extensions to the core Ruby classes

273 stars0 likes1 views
WebsiteGitHub

About

Some useful extensions to the core Ruby classes

Powerpack

Powerpack offers some useful extensions to the standard Ruby classes (kind of like ActiveSupport, but less ambitious and more modular).

The project has several design goals:

  • minimalistic - we don't add every possible extensions, we focus only on the stuff that are commonly requested and would be often useful in practice
  • modular - all extensions can be loaded individually (often they are just individual methods)
  • safe - you can't end up accidentally overriding some existing method definition with Powerpack's extensions

Installation

Add this line to your application's Gemfile (if you're using bundler, that is):

gem 'powerpack'

And then execute:

$ bundle

Or install it yourself as:

$ gem install powerpack

Extensions

  • Array
    • #butfirst
    • #butlast
  • Enumerable
    • #average
    • #drop_last
    • #drop_last_while
    • #exactly?
    • #frequencies
    • #several?
    • #sum
    • #take_last
    • #take_last_while
  • Hash
    • #symbolize_keys
  • Numeric
    • #pos?
    • #neg?
    • #hundred
    • #thousand
    • #million
    • #billion
    • #trillion
    • #quadrillion
  • String
    • #ascii_only
    • #ascii_only!
    • #blank?
    • #format
    • #remove
    • #remove!
    • #remove_prefix
    • #remove_prefix!
    • #remove_suffix
    • #remove_suffix!
    • #strip_indent
    • #strip_margin
    • #squish
    • #squish!

Documentation

A listing of the extensions provided by Powerpack is available here.

Usage

To load the entire powerpack do:

require 'powerpack'

To load only the String extensions do:

require 'powerpack/string'

To load only a specific extension like String#format do:

require 'powerpack/string/format'

Changelog

Powerpack's changelog is available here.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Issues· 6 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言