Module: Linguistics::Latin::Verb::Validation
- Included in:
- LatinVerb
- Defined in:
- lib/linguistics/latin/verb/latinverb/validation.rb
Overview
NAME
Validation
DESCRIPTION
This module contains the validity testing methods, when mixed into a LatinVerb, will provide it the ability to ensure its own sanity.
Instance Method Summary collapse
-
#valid? ⇒ Boolean
DESCRIPTION.
Instance Method Details
#valid? ⇒ Boolean
DESCRIPTION
This performs the basic task of evaluating the given string (cf. LatinVerb.initialize) for basic sanity.
Here are its basic truths
-
Get @original_string as an iVar
-
Derive a classification (+@classification+) from the string
-
Determine whether the string qualifies the verb as irregular
-
Identify a stem (+@stem+), provided the verb is regular
33 34 35 36 37 |
# File 'lib/linguistics/latin/verb/latinverb/validation.rb', line 33 def valid? !@original_string.nil? && !classification.nil? && ( irregular? ? true : !stem.nil? ) end |