Sha256: 54c98e648e576734c97aab801fbef97a0b0c021e917dc1579700d874780b7097

Contents?: true

Size: 201 Bytes

Versions: 8

Compression:

Stored size: 201 Bytes

Contents

# Enumerable extensions
module Enumerable
  # Helps you find duplicates
  # used in schema_to_yaml.rb for cleanup
  def dups
    inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
captproton-restfulx-1.2.3 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
dima-restfulx-1.2.3 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
dima-restfulx-1.2.4 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
rlmattax-restfulx-1.2.4.1 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
restfulx-1.2.5 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
restfulx-1.2.3 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
restfulx-1.2.4 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb
restfulx-1.2.2 lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb