Description
Ruby includes a huge amount of default awesomeness that tackles most common development challenges. But every now and then, you find yourself in a situation where an elaborate-yet-precise coding maneuver wins the day. Finishing Moves is a collection of methods designed to assist in those just-typical-enough-to-be-annoying scenarios.
In gamer terms, if standard Ruby methods are your default moves, Finishing Moves would be mana-consuming techniques. Your cooldown spells. Your grenades (there's never enough grenades!). In the right situation, they kick serious cyclomatic butt.
Finishing Moves alternatives and similar gems
Based on the "Core Extensions" category.
Alternatively, view Finishing Moves alternatives based on common mentions on social networks and blogs.
-
Addressable
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. It is flexible, offers heuristic parsing, and additionally provides extensive support for IRIs and URI templates. -
fast_blank
fast_blank is a simple C extension which provides a fast implementation of Active Support's String#blank? method. -
ArrayIncludeMethods
Array#include_all?, Array#include_any?, Array#include_array?, Array#array_index, Array#array_diff_indices, Array#array_intersection_indices, Array#counts, and Array#duplicates operations missing from basic Ruby Array API -
ToCollection
Treat an array of objects and a singular object uniformly as a collection of objects. Especially useful in processing REST Web Service API JSON responses in a functional approach.
Scout Monitoring - Performance metrics and, now, Logs Management Monitoring with Scout Monitoring
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Finishing Moves or a related project?
README
Finishing Moves
Ruby includes a huge amount of default awesomeness that tackles most common development challenges. But every now and then, you find yourself performing contortions to achieve results that, honestly, should feel more natural given the language's design elegance. Finishing Moves is a collection of methods designed to assist in those "why is this awkward?" scenarios.
In the right situation, they kick serious cyclomatic butt.
Installation
Gemfile
gem 'finishing_moves'
Command line
gem install 'finishing_moves'
Documentation
Not sure if this gem is for you? Check out the methods marked with a :boom: first.
Array#to_hash_values
:boom:Array#to_indexed_hash
Array#to_hash_keys
Array#to_sym_strict
Array#to_sym_loose
Enumerable#key_map
:boom:Enumerable#key_map_reduce
Hash#delete!
Hash#delete_each
Hash#delete_each!
Integer#length
Kernel#nil_chain
:boom::boom:Kernel#cascade
Kernel#class_exists?
Numeric#add_percent
Numeric#subtract_percent
Object#same_as
Object#not_nil?
Object#numeric?
:boom:Object#is_an?
Object#is_not_a?
Object#is_one_of?
:boom:Object#true?
Object#false?
Object#bool?
Object#true_?
Object#false_?
String#dedupe
String#keyify
String#slugify
String#match?
String#nl2br
String#newline_to
String#remove_whitespace
String#replace_whitespace
String#strip_all
:boom:- Boolean Typecasting (multi-class enhancement)
Ruby Version
Tested against all supported versions of official RVM, currently 2.5.0
and above.
Development approach
- Never override default Ruby behavior, only add functionality.
- Follow the Unix philosophy of "Do one job really well."
- Minimize assumptions, e.g. avoid formatting output, mutating values, and conditional logic flows.
- Play nice with major Ruby players like Rake, Rails, and Sinatra.
- Test all the things.
Bug Reports
Drop us a line in the issues section.
Be sure to include sample code that reproduces the problem.
Add your own finisher!
- Fork this repo
- Write your tests
- Add your finisher
- Repeat steps 2 and 3 until you see a brilliant luster
- Submit a pull request