👻 Ruby EnumerableLast updated on Dec 4, 2020 1 min read rubyEnumerablemethod takes a blockmethod takes no argssomething elseEnumerablemethod takes a block…yes/noyes/noinfo / statsinfo / statsiterate / loopiterate / loopsortsortretrieve one instanceretrieve one instancefilter out subsetfilter out subsettransformtransformwith block#all? {block}#any? {block}#none? {block}with block…with object#include? (obj)with object…#count#count {block}#min#min {|a, b| …}#min_by {block}#max#max {|a, b| …}#max_by {block}#minmax#minmax{|a, b| …}#minmax_by {block#count…staggered loops#each_corns(n) {block}#each_slice(n) {block}staggered loops…#each {block}#each_with_object (o) {|el,o| … }#each_with_index {|el, i| … }#each {block}…#sort#sort { |a,b| …}#sort_by {block}#reverse#sort…#find {block}#first#last#find {block}…by amount#drop (n)#take (n)by block#drop_while {block}#take_while {block}#find_all {block}#reject {block}reject {block}by pattern#grep /pattern/by amount…#inject {block}#map {block}#partition {block}#chunk {block}#group_by {block}#inject {block}…Viewer does not support full SVG 1.1Zane ZhengFull Stack (Ruby on Rails) / DevopsAn Full Stack / Devops with JS, Ruby, Linux, JAMStack, MicroServices.Related🤐 CMS Essential😈 Sidekiq🤡 Ruby on Rails Gems List