Class: FormIPastBase
- Inherits:
-
Base
- Object
- Base
- FormIPastBase
show all
- Defined in:
- lib/arabic_conjugator/past_bases/form_I_past_base.rb
Instance Method Summary
collapse
Methods inherited from Base
#adjust_first_radical, #assimilated_base, #assimilated_defective_base, #hollow_defective_base, #regular_base
Constructor Details
Returns a new instance of FormIPastBase.
9
10
11
12
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 9
def initialize(verb)
super
@base = @root1 + @root2 + @root3
end
|
Instance Method Details
#adjust_second_radical ⇒ Object
47
48
49
50
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 47
def adjust_second_radical
base = @root1 + @root2 + @root3
@root2 = FORM_I_HAMZATED_PAST[base]
end
|
#adjust_third_radical ⇒ Object
52
53
54
55
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 52
def adjust_third_radical
base = @root1 + @root2 + @root3
@root3 = FORM_I_HAMZATED_PAST[base]
end
|
#defective_base ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 26
def defective_base
base = @base[0...-1]
if @pronoun == :he
return base + FORM_I_DEFECTIVE_PAST[@base] if FORM_I_DEFECTIVE_PAST[@base]
return base + "ا" if @root3 == "و"
return base + "ى"
elsif [:I, :you_m, :you_f, :you_pl].include?(@pronoun)
@base
else
base
end
end
|
#doubled_base ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 39
def doubled_base
if [:he, :she, :they].include?(@pronoun)
@base[0...-1] + "ّ"
else
@base
end
end
|
#hollow_base ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/arabic_conjugator/past_bases/form_I_past_base.rb', line 14
def hollow_base
if [:he, :she, :they].include?(@pronoun)
if @root3 == "ئ"
@root1 + "اء"
else
@root1 + (FORM_I_HOLLOW_PAST[@base] ||= "ا") + @root3
end
else
@root1 + @root3
end
end
|