Sha256: c0bc9939dedf95b9a7d443e2262a2f935f38c8bc9a8cbc051a073b0b81738ebb

Contents?: true

Size: 319 Bytes

Versions: 2

Compression:

Stored size: 319 Bytes

Contents

module DuckPuncher
   module Array
     def m(method_name)
       map(&method_name)
     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

Array.send(:include, DuckPuncher::Array)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
duck_puncher-1.0.0 lib/duck_puncher/array.rb
duck_puncher-0.2.0 lib/duck_puncher/array.rb