Class: FormIIIPastBase
- Inherits:
-
Base
- Object
- Base
- FormIIIPastBase
show all
- Defined in:
- lib/arabic_conjugator/past_bases/form_III_past_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 FormIIIPastBase.
7
8
9
10
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 7
def initialize(verb)
super
@base = calculate_base
end
|
Instance Method Details
#adjust_first_radical ⇒ Object
22
23
24
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 22
def adjust_first_radical
@root1 = "آ"
end
|
#adjust_second_radical ⇒ Object
26
27
28
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 26
def adjust_second_radical
@root2 = "ء"
end
|
#adjust_third_radical ⇒ Object
30
31
32
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 30
def adjust_third_radical
@root3 = "أ"
end
|
#calculate_base ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 34
def calculate_base
if @root1 == "آ"
@root1 + @root2 + @root3
else
@root1 + "ا" + @root2 + @root3
end
end
|
#defective_base ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/arabic_conjugator/past_bases/form_III_past_base.rb', line 12
def defective_base
if @root3 == "و" && @pronoun == :he
@base[0...-1] + "ا"
elsif @root3 == "ي" && @pronoun == :he
@base[0...-1] + "ى"
else
@base
end
end
|