Module: Domain::SByC
- Defined in:
- lib/domain/factory/sbyc.rb
Defined Under Namespace
Modules: Methods
Class Method Summary collapse
- .class_module(super_domain, predicate) ⇒ Object
- .new(super_domain = Object, predicate = nil, &bl) ⇒ Object
Class Method Details
.class_module(super_domain, predicate) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/domain/factory/sbyc.rb', line 9 def self.class_module(super_domain, predicate) Module.new{ define_method(:super_domain){ super_domain } define_method(:predicate) { predicate } } end |
.new(super_domain = Object, predicate = nil, &bl) ⇒ Object
4 5 6 7 |
# File 'lib/domain/factory/sbyc.rb', line 4 def self.new(super_domain = Object, predicate = nil, &bl) predicate = predicate || bl || Domain::TRUE_PREDICATE DomainFactory.factor [ Methods, class_module(super_domain, predicate) ] end |