Class: Is::Property::Validators::AND
- Defined in:
- lib/is/monkey/properties.rb
Direct Known Subclasses
Instance Method Summary collapse
- #===(value) ⇒ Boolean
-
#initialize(*args) ⇒ AND
constructor
A new instance of AND.
Constructor Details
#initialize(*args) ⇒ AND
Returns a new instance of AND.
297 298 299 |
# File 'lib/is/monkey/properties.rb', line 297 def initialize *args @args = args end |
Instance Method Details
#===(value) ⇒ Boolean
303 304 305 306 307 308 309 310 |
# File 'lib/is/monkey/properties.rb', line 303 def === value @args.each do |v| if !(v === value) return false end end return true end |