Class: FormIVPastBase
- Inherits:
-
Base
- Object
- Base
- FormIVPastBase
show all
- Defined in:
- lib/arabic_conjugator/past_bases/form_IV_past_base.rb
Instance Method Summary
collapse
Methods inherited from Base
#assimilated_base, #assimilated_defective_base, #defective_base, #doubled_base, #hollow_defective_base, #regular_base
Constructor Details
Returns a new instance of FormIVPastBase.
7
8
9
10
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 7
def initialize(verb)
super
@base = calculate_base
end
|
Instance Method Details
#adjust_first_radical ⇒ Object
28
29
30
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 28
def adjust_first_radical
@root1 = "آ"
end
|
#adjust_second_radical ⇒ Object
32
33
34
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 32
def adjust_second_radical
@root2 = "أ"
end
|
#adjust_third_radical ⇒ Object
36
37
38
39
40
41
42
43
44
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 36
def adjust_third_radical
if [:he, :she].include?(@pronoun) && ["و", "ي"].include?(@root2)
@root3 = "ء"
elsif @pronoun == :they
@root3 = "ؤ"
else
@root3 = "أ"
end
end
|
#calculate_base ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 20
def calculate_base
if @root1 == "آ"
@root1 + @root2 + @root3
else
"أ" + @root1 + @root2 + @root3
end
end
|
#hollow_base ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/arabic_conjugator/past_bases/form_IV_past_base.rb', line 12
def hollow_base
if [:he, :she, :they].include?(@pronoun)
"أ" + @root1 + "ا" + @root3
else
"أ" + @root1 + @root3
end
end
|