Module: Domain::Union

Defined in:
lib/domain/factory/union.rb

Defined Under Namespace

Modules: Methods

Class Method Summary collapse

Class Method Details

.class_module(sub_domains) ⇒ Object



8
9
10
11
12
# File 'lib/domain/factory/union.rb', line 8

def self.class_module(sub_domains)
  Module.new{
    define_method(:sub_domains){ sub_domains }
  }
end

.new(*sub_domains) ⇒ Object



4
5
6
# File 'lib/domain/factory/union.rb', line 4

def self.new(*sub_domains)
  DomainFactory.factor [ Methods, Comparisons, class_module(sub_domains) ]
end