Class: Is::Property::Validators::ONE
- Defined in:
- lib/is/monkey/properties.rb
Instance Method Summary collapse
- #===(value) ⇒ Boolean
-
#initialize(*args) ⇒ ONE
constructor
A new instance of ONE.
Constructor Details
#initialize(*args) ⇒ ONE
Returns a new instance of ONE.
338 339 340 341 |
# File 'lib/is/monkey/properties.rb', line 338 def initialize *args @or = OR.new *args @and = AND.new *args end |
Instance Method Details
#===(value) ⇒ Boolean
345 346 347 |
# File 'lib/is/monkey/properties.rb', line 345 def === value @or === value && !(@and === value) end |