Sha256: 2c82ae00e79c07dbb13c83ea01903e468bf9539394217fdc1ad25f8f98426ce7

Contents?: true

Size: 482 Bytes

Versions: 24

Compression:

Stored size: 482 Bytes

Contents

module Odania
	module Config
		class Duplicates
			def initialize
				@duplicates = Hash.new { |hash, key| hash[key] = Duplicate.new }
			end

			def add(type, key, group_name)
				@duplicates[type].add(key, group_name)
			end

			def duplicates
				@duplicates
			end

			class Duplicate
				def initialize
					@duplicate = {}
				end

				def add(key, group_name)
					@duplicate[key] = [] if @duplicate[key].nil?
					@duplicate[key] << group_name
				end
			end
		end
	end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
odania-0.1.0 lib/odania/config/duplicates.rb
odania-0.0.39 lib/odania/config/duplicates.rb
odania-0.0.38 lib/odania/config/duplicates.rb
odania-0.0.37 lib/odania/config/duplicates.rb
odania-0.0.36 lib/odania/config/duplicates.rb
odania-0.0.35 lib/odania/config/duplicates.rb
odania-0.0.34 lib/odania/config/duplicates.rb
odania-0.0.33 lib/odania/config/duplicates.rb
odania-0.0.32 lib/odania/config/duplicates.rb
odania-0.0.31 lib/odania/config/duplicates.rb
odania-0.0.30 lib/odania/config/duplicates.rb
odania-0.0.29 lib/odania/config/duplicates.rb
odania-0.0.28 lib/odania/config/duplicates.rb
odania-0.0.27 lib/odania/config/duplicates.rb
odania-0.0.26 lib/odania/config/duplicates.rb
odania-0.0.25 lib/odania/config/duplicates.rb
odania-0.0.24 lib/odania/config/duplicates.rb
odania-0.0.23 lib/odania/config/duplicates.rb
odania-0.0.22 lib/odania/config/duplicates.rb
odania-0.0.21 lib/odania/config/duplicates.rb