Class: Blueprinter::BlueprintValidator Private
- Inherits:
-
Object
- Object
- Blueprinter::BlueprintValidator
- Defined in:
- lib/blueprinter/blueprint_validator.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
-
.validate!(blueprint) ⇒ Boolean
private
Determines whether the provided object is a valid Blueprint.
Class Method Details
.validate!(blueprint) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Determines whether the provided object is a valid Blueprint.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/blueprinter/blueprint_validator.rb', line 12 def validate!(blueprint) if valid_blueprint?(blueprint) true else raise( Errors::InvalidBlueprint, "#{blueprint} is not a valid blueprint. Please ensure it subclasses Blueprinter::Base or is a Proc." ) end end |