Class: Linguistics::Latin::Verb::LatinVerb::Mutators::Invariant::PassiveVoiceIndicativeMoodPastperfectTenseStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb

Instance Method Summary collapse

Constructor Details

#initialize(verb) ⇒ PassiveVoiceIndicativeMoodPastperfectTenseStrategy

Returns a new instance of PassiveVoiceIndicativeMoodPastperfectTenseStrategy.



8
9
10
# File 'lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb', line 8

def initialize(verb)
  @verb = verb
end

Instance Method Details

#apply!Object



12
13
14
15
16
17
18
19
20
# File 'lib/latinverb/tense_method_applicator/mutators/invariant/passive_voice_indicative_mood_pastperfect_tense_strategy.rb', line 12

def apply!
  @verb.instance_eval do
    def passive_voice_indicative_mood_pastperfect_tense
      elements = Linguistics::Latin::Verb::PASS_PERF_PAST_ENDINGS.map{ |helping_verb| "#{passive_perfect_participle} #{helping_verb}"  }
      meaning = { :meaning =>  Linguistics::Latin::Verb::MEANINGS[:passive_voice_indicative_mood_pastperfect_tense]}
      TenseBlock.new(elements, meaning)
    end
  end
end