Module: Boundy::Comparator

Included in:
Domain::Comparator, Range::Comparator, Time::Comparator
Defined in:
lib/boundy/comparator.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/boundy/comparator.rb', line 5

def self.included(base)
  types = if base.respond_to?(:type)
            [base.type]
          elsif base.respond_to?(:types)
            base.types
          else
            []
          end

  types.each do |t|
    Boundy::Comparators.add(t, base)
  end
end