Class: ShapeOf::Nothing
Overview
Only passes when the key does not exist in the Hash.
Class Method Summary collapse
- .required? ⇒ Boolean
- .shape_of?(object, validator: Validator.new(shape: self, object: object)) ⇒ Boolean
Methods inherited from Shape
Constructor Details
This class inherits a constructor from ShapeOf::Shape
Class Method Details
.shape_of?(object, validator: Validator.new(shape: self, object: object)) ⇒ Boolean
465 466 467 468 |
# File 'lib/shape_of.rb', line 465 def self.shape_of?(object, validator: Validator.new(shape: self, object: object)) validator.add_error("key present when not allowed") false end |