Class: Linguistics::Latin::Verb::LatinVerb::Mutators::Semideponent

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

Instance Method Summary collapse

Constructor Details

#initialize(verb) ⇒ Semideponent

Returns a new instance of Semideponent.



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

def initialize(verb)
  @verb = verb
  @proxyVerb = LatinVerb.new(DeponentStringDeriver.new(@verb.original_string).proxy_string)

  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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/latinverb/tense_method_applicator/mutators/semideponent.rb', line 14

def mutate!
  p = @proxyVerb
  @verb.instance_eval do
    @proxyVerb = p
    def active_voice_indicative_mood_present_tense
      return @proxyVerb.send :active_voice_indicative_mood_present_tense
    end

    def active_voice_indicative_mood_imperfect_tense
      return @proxyVerb.send :active_voice_indicative_mood_imperfect_tense
    end

    def active_voice_indicative_mood_future_tense
      return @proxyVerb.send :active_voice_indicative_mood_future_tense
    end

    # These methods handle the strangeness of semi-deponents, it masks
    # passive perfects to active perfects

    def active_voice_indicative_mood_perfect_tense
      return @proxyVerb.send :passive_voice_indicative_mood_perfect_tense
    end

    def active_voice_indicative_mood_pastperfect_tense
      return @proxyVerb.send :passive_voice_indicative_mood_pastperfect_tense
    end

    def active_voice_indicative_mood_futureperfect_tense
      return @proxyVerb.send :passive_voice_indicative_mood_futureperfect_tense
    end

    def passive_voice_indicative_mood_perfect_tense
      return NullTenseBlock.new
    end

    def passive_voice_indicative_mood_pastperfect_tense
      return NullTenseBlock.new
    end

    def passive_voice_indicative_mood_futureperfect_tense
      return NullTenseBlock.new
    end

    # Subjunctives: 2 active, 2 passive
    def active_voice_subjunctive_mood_present_tense
      return @proxyVerb.send :active_voice_subjunctive_mood_present_tense
    end

    def active_voice_subjunctive_mood_imperfect_tense
      return @proxyVerb.send :active_voice_subjunctive_mood_imperfect_tense
    end

    def active_voice_subjunctive_mood_perfect_tense
      return @proxyVerb.send :passive_voice_subjunctive_mood_perfect_tense
    end

    def active_voice_subjunctive_mood_pastperfect_tense
      return @proxyVerb.send :passive_voice_subjunctive_mood_pastperfect_tense
    end

    def passive_voice_subjunctive_mood_perfect_tense
      return NullTenseBlock.new
    end

    def passive_voice_subjunctive_mood_pastperfect_tense
      return NullTenseBlock.new
    end
  end
end