Class: Linguistics::Latin::Verb::LatinVerb::TenseMethodApplicator::MutatorForClassificationFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb

Constant Summary collapse

MAPPING =
{
  Impersonal: Mutators::Impersonal,
  PresentOnly: Mutators::PresentOnly,
  Irregular: Mutators::Irregular,
  Deponent: Mutators::Deponent,
  Semideponent: Mutators::Semideponent,
  Regular: Mutators::Regular
}

Instance Method Summary collapse

Constructor Details

#initialize(verb) ⇒ MutatorForClassificationFactory

Returns a new instance of MutatorForClassificationFactory.



25
26
27
28
# File 'lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb', line 25

def initialize(verb)
  @verb = verb
  @classification = verb.classification
end

Instance Method Details

#mutatorObject



30
31
32
# File 'lib/latinverb/tense_method_applicator/mutator_for_classification_factory.rb', line 30

def mutator
  MAPPING[@classification.short_name_key].new(@verb)
end