class Planter::Validator
Performs read-only validation of the configured seed plan.
The validator checks that requested seeders can be loaded, that built-in seeding methods have the files or data they need, and that the configured adapter exposes Planter’s public adapter API.
Constants
- REQUIRED_ADAPTER_METHODS
-
Adapter methods required for Planter’s public adapter API.
@return [Array<Symbol>]
Public Class Methods
Source
# File lib/planter/validator.rb, line 77 def initialize(config: Planter.config, seeders: nil) @config = config @seeders = seeders || requested_seeders @result = Result.new end
Create a validator.
@param config [Planter::Config]
@param seeders [Array<String>, nil] seeders to validate
Public Instance Methods
Source
# File lib/planter/validator.rb, line 87 def validate seeders_present = validate_seeders_present validate_adapter validate_seeders if seeders_present result end
Validate the seed plan without creating, updating, or deleting records.
@return [Planter::Validator::Result]