powerpack icon indicating copy to clipboard operation
powerpack copied to clipboard

Some useful extensions to the core Ruby classes

Results 7 powerpack issues
Sort by recently updated
recently updated
newest added

Occasionally in rails projects I will find myself doing some comparison logic on a string that is returning 'true' or 'false'. Sometimes I will create a helper method or use...

There is a bug in the string#strip_margin methods The example given: "|def abc\n|xyz".strip_margin("|") # same string, not work but " |def abc\n |xyz".strip_margin("|") # => "def abc\nxyz" because in the...

These are some methods I've personally added on projects before, I don't have time to PR them, but you might find these interesting ideas: ```ruby # Returns `value` if `value`...

The current constants `BILLION`, `TRILLION`, `QUADRILLION` work for short-scale only. A quick mention that billion is `10 to the 9th` and not `10 to the 12th` could avoid bugs and...

The documentation for [String#squish](https://www.rubydoc.info/gems/powerpack/String#squish-instance_method) states that it "Strips leading and trailing whitespace and squashes internal whitespace." It fails to mention that all occurences in the string that match `\s` (which...

What do you think about merging with tiny library like http://github.com/hbakhtiyor/rcore-ext?

I noticed that you are already on GitHub Sponsors. This PR adds the `funding_uri` to your gemspec to help increase visibility using the `bundle fund` command in Bundler.