Class: Linguistics::Latin::Verb::LatinVerb::Mutators::Deponent::ParticipleMutator

Inherits:
Object
  • Object
show all
Defined in:
lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb

Instance Method Summary collapse

Constructor Details

#initialize(verb, proxyVerb) ⇒ ParticipleMutator

Returns a new instance of ParticipleMutator.



8
9
10
11
12
# File 'lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb', line 8

def initialize(verb, proxyVerb)
  @verb = verb
  @proxyVerb = proxyVerb
  mutate!
end

Instance Method Details

#mutate!Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/latinverb/tense_method_applicator/mutators/deponent/participle_mutator.rb', line 14

def mutate!
  proxyVerb = @proxyVerb
  @verb.instance_eval do
    @proxyVerb = proxyVerb

    def present_active_participle
      return @proxyVerb.present_active_participle
    end

    def future_active_participle
      return @proxyVerb.future_active_participle
    end

    def perfect_active_participle
      return @proxyVerb.perfect_passive_participle
    end

    def future_passive_participle
      return @proxyVerb.future_passive_participle
    end

    # Mask the supine
    def supine
      return @proxyVerb.supine
    end
  end
end