Module: Enumerable

Defined in:
lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb

Overview

Enumerable extensions

Instance Method Summary collapse

Instance Method Details

#dupsObject

Helps you find duplicates used in schema_to_yaml.rb for cleanup



5
6
7
# File 'lib/restfulx/rails/schema_to_yaml/extensions/enumerable.rb', line 5

def dups
  inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
end