Class: FormVIPresentBase
- Inherits:
-
Base
- Object
- Base
- FormVIPresentBase
show all
- Defined in:
- lib/arabic_conjugator/present_bases/form_VI_present_base.rb
Instance Method Summary
collapse
Methods inherited from Base
#assimilated_base, #assimilated_defective_base, #doubled_base, #hollow_base, #hollow_defective_base, #regular_base
Constructor Details
Returns a new instance of FormVIPresentBase.
8
9
10
11
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 8
def initialize(verb)
super
@base = calculate_base
end
|
Instance Method Details
#adjust_first_radical ⇒ Object
21
22
23
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 21
def adjust_first_radical
@root1 = "آ"
end
|
#adjust_second_radical ⇒ Object
25
26
27
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 25
def adjust_second_radical
@root2 = "ء"
end
|
#adjust_third_radical ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 29
def adjust_third_radical
if [:they, :you_pl].include?(@pronoun)
@root3 = "ؤ"
elsif @pronoun == :you_f
@root3 == "ئ"
else
@root3 == "أ"
end
end
|
#calculate_base ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 39
def calculate_base
if @root1 == "آ"
"ت" + @root1 + @root2 + @root3
else
"ت" + @root1 + "ا" + @root2 + @root3
end
end
|
#defective_base ⇒ Object
13
14
15
16
17
18
19
|
# File 'lib/arabic_conjugator/present_bases/form_VI_present_base.rb', line 13
def defective_base
if [:you_f, :you_pl, :they].include?(@pronoun)
@base[0...-1]
else
@base[0...-1] + "ى"
end
end
|