Sha256: dd2b5fa3fa585ed1a361cab26a9e10a286c63da4a21f72761c7020deada2acbd
Contents?: true
Size: 407 Bytes
Versions: 15
Compression:
Stored size: 407 Bytes
Contents
module DuckPuncher module Ducks module Array def m(method_name) map(&method_name) end def mm(method_name, *args) map { |x| x.public_send(method_name, *args) } end def get(regex_or_str) regex = regex_or_str.is_a?(Regexp) ? regex_or_str : Regexp.new(Regexp.escape(regex_or_str)) select { |x| x.to_s =~ regex } end end end end
Version data entries
15 entries across 15 versions & 1 rubygems