Sha256: d9d63707decba09f12f2a1ea6f2a446f3490ccc8deae993458251c062879122c
Contents?: true
Size: 460 Bytes
Versions: 2
Compression:
Stored size: 460 Bytes
Contents
module Domain module CoercionMethods def coercions(&bl) @coercions ||= ::Myrrha::Coercions.new{|c| c.main_target_domain = self} @coercions.append(&bl) if bl @coercions end def coerce(arg) coercions.coerce(arg, self) rescue Myrrha::Error => ex raise ex.cause if ex.cause domain_error!(arg) end alias_method :[], :coerce end # module CoercionMethods include CoercionMethods end # module Domain
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
myrrha-3.0.0.rc6 | lib/myrrha/ext/domain.rb |
myrrha-3.0.0.rc5 | lib/myrrha/ext/domain.rb |