Class: FormVIPastBase

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

Instance Method Summary collapse

Methods inherited from Base

#assimilated_base, #assimilated_defective_base, #defective_base, #doubled_base, #hollow_base, #hollow_defective_base, #regular_base

Constructor Details

#initialize(verb) ⇒ FormVIPastBase

Returns a new instance of FormVIPastBase.



7
8
9
10
# File 'lib/arabic_conjugator/past_bases/form_VI_past_base.rb', line 7

def initialize(verb)
  super
  @base = calculate_base
end

Instance Method Details

#adjust_first_radicalObject



12
13
14
# File 'lib/arabic_conjugator/past_bases/form_VI_past_base.rb', line 12

def adjust_first_radical
  @root1 = "آ"
end

#adjust_second_radicalObject



16
17
18
# File 'lib/arabic_conjugator/past_bases/form_VI_past_base.rb', line 16

def adjust_second_radical
  @root2 = "ء"
end

#adjust_third_radicalObject



20
21
22
# File 'lib/arabic_conjugator/past_bases/form_VI_past_base.rb', line 20

def adjust_third_radical
  @root3 = "أ"
end

#calculate_baseObject



24
25
26
27
28
29
30
# File 'lib/arabic_conjugator/past_bases/form_VI_past_base.rb', line 24

def calculate_base
  if @root1 == "آ"
    "ت" + @root1 + @root2 + @root3
  else
    "ت" + @root1 + "ا" + @root2 + @root3
  end
end