Class: Dhall::Util::AllOf
- Inherits:
-
Object
- Object
- Dhall::Util::AllOf
- Defined in:
- lib/dhall/util.rb
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(*validators) ⇒ AllOf
constructor
A new instance of AllOf.
Constructor Details
#initialize(*validators) ⇒ AllOf
Returns a new instance of AllOf.
26 27 28 |
# File 'lib/dhall/util.rb', line 26 def initialize(*validators) @validators = validators end |
Instance Method Details
#===(other) ⇒ Object
30 31 32 |
# File 'lib/dhall/util.rb', line 30 def ===(other) @validators.all? { |v| v === other } end |