Class: FormVIIIPastBase

Inherits:
Base
  • Object
show all
Defined in:
lib/arabic_conjugator/past_bases/form_VIII_past_base.rb

Instance Method Summary collapse

Methods inherited from Base

#defective_base, #hollow_defective_base

Constructor Details

#initialize(verb) ⇒ FormVIIIPastBase

Returns a new instance of FormVIIIPastBase.



10
11
12
13
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 10

def initialize(verb)
  super
  @base =  "ا" + @root1 + "ت" + @root2 + @root3
end

Instance Method Details

#adjust_first_radicalObject



66
67
68
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 66

def adjust_first_radical
  @root1 = (FORM_VIII_HAMZATED[@root1 + @root2 + @root3] ||= "ئ")
end

#adjust_second_radicalObject



70
71
72
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 70

def adjust_second_radical
  @root2 = "أ"
end

#adjust_third_radicalObject



74
75
76
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 74

def adjust_third_radical
  @root3 = "أ"
end

#assimilated_baseObject



50
51
52
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 50

def assimilated_base
  "اتّ" + @root2 + @root3
end

#assimilated_defective_baseObject



39
40
41
42
43
44
45
46
47
48
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 39

def assimilated_defective_base
  @base = "اتّ" + @root2
  if @pronoun == :he
    @base + "ى"
  elsif [:she, :they].include?(@pronoun)
    @base
  else
    @base + "ي"
  end
end

#assimilated_taa_baseObject



54
55
56
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 54

def assimilated_taa_base
  "ا" + @root1 + "ّ" + @root2 + @root3
end

#doubled_baseObject



34
35
36
37
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 34

def doubled_base
  @base = morphed_taa_base if ["ز", "ذ", "ص", "ض"].include?(@root1)
  super
end

#hollow_baseObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 23

def hollow_base
  @root2 = (FORM_VIII_HOLLOW[@root1+@root2+@root3] ||= "ا")
  @base =  "ا" + @root1 + "ت" + @root2 + @root3
  @base = morphed_taa_base if ["ز", "ذ", "ص", "ض"].include?(@root1)
  if @root2 == "ا" && ![:he, :she, :they].include?(@pronoun)
    @base[0..2] + @root3
  else
    @base
  end
end

#morphed_taa_baseObject



58
59
60
61
62
63
64
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 58

def morphed_taa_base
  if ["ز", "ذ"].include?(@root1)
    "ا" + @root1 + "د" + @root2 + @root3
  else
    "ا" + @root1 + "ط" + @root2 + @root3
  end
end

#regular_baseObject



15
16
17
18
19
20
21
# File 'lib/arabic_conjugator/past_bases/form_VIII_past_base.rb', line 15

def regular_base
  if @root1 == "ت"
    "اتّ" + @root2 + @root3
  else
    @base
  end
end