Sha256: 8f9ce77ade6c69f59b70d8dea1daa1a0cab6dcb62afdcc52744644bb0b60573e
Contents?: true
Size: 648 Bytes
Versions: 12
Compression:
Stored size: 648 Bytes
Contents
module CLIUtils # The generic base class for a Pref # Validator. class PrefValidator include Messaging # Holds whether the validator returned # successful or not. # @return [Boolean] attr_accessor :is_valid # Holds the message to display to the # user when the Validator fails. # @return [String] attr_accessor :message # Validate the Validator! # @param [String] text # @raise [StandardError] if the subclass # doesn't implement this method. # @return [void] def validate(text = nil) fail "`validate` method not implemented on caller: #{ self.class }" end end end
Version data entries
12 entries across 12 versions & 1 rubygems