Class: Odania::Config::Duplicates
- Inherits:
-
Object
- Object
- Odania::Config::Duplicates
- Defined in:
- lib/odania/config/duplicates.rb
Defined Under Namespace
Classes: Duplicate
Instance Method Summary collapse
- #add(type, key, group_name) ⇒ Object
- #duplicates ⇒ Object
-
#initialize ⇒ Duplicates
constructor
A new instance of Duplicates.
Constructor Details
#initialize ⇒ Duplicates
Returns a new instance of Duplicates.
4 5 6 |
# File 'lib/odania/config/duplicates.rb', line 4 def initialize @duplicates = Hash.new { |hash, key| hash[key] = Duplicate.new } end |
Instance Method Details
#add(type, key, group_name) ⇒ Object
8 9 10 |
# File 'lib/odania/config/duplicates.rb', line 8 def add(type, key, group_name) @duplicates[type].add(key, group_name) end |
#duplicates ⇒ Object
12 13 14 |
# File 'lib/odania/config/duplicates.rb', line 12 def duplicates @duplicates end |