Class: EducationForm::Forms::VA10203

Inherits:
Base
  • Object
show all
Defined in:
app/sidekiq/education_form/forms/va_10203.rb

Constant Summary

Constants inherited from Base

Base::TEMPLATE_PATH

Instance Attribute Summary

Attributes inherited from Base

#form, #record, #text

Instance Method Summary collapse

Methods inherited from Base

#applicant_name, #applicant_ssn, #benefit_type, build, #direct_deposit_type, #disclosure_for, #employment_history, #format, #full_address, #full_address_with_street3, #full_name, #get_template, #header, #hours_and_type, #parse_with_template, #parse_with_template_path, #school, #school_name_and_addr, #ssn_gender_dob, #to_date, #value_or_na, #yesno, #yesno_or_blank

Constructor Details

#initialize(app) ⇒ VA10203

Returns a new instance of VA10203.



5
6
7
8
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 5

def initialize(app)
  @stem_automated_decision = app.education_stem_automated_decision
  super(app)
end

Instance Method Details

#any_remaining_benefitObject



30
31
32
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 30

def any_remaining_benefit
  yesno(%w[moreThanSixMonths sixMonthsOrLess].include?(benefit_left))
end

#benefit_leftObject



40
41
42
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 40

def benefit_left
  @benefit_left ||= @applicant.benefitLeft
end

#denied?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 10

def denied?
  @stem_automated_decision&.automated_decision_state == 'denied'
end

#enrolled_stemObject



48
49
50
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 48

def enrolled_stem
  @enrolled_stem ||= @applicant.isEnrolledStem
end

#form_benefitObject



22
23
24
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 22

def form_benefit
  @applicant.benefit&.titleize
end

#form_identifierObject



18
19
20
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 18

def form_identifier
  denied? ? 'VA Form 22-10203DNY' : 'VA Form 22-10203'
end

#header_form_typeObject



14
15
16
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 14

def header_form_type
  denied? ? '10203DNY' : 'V10203'
end

#pursuing_teaching_certObject



44
45
46
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 44

def pursuing_teaching_cert
  @pursuing_teaching_cert ||= @applicant.isPursuingTeachingCert
end

#receive_text_messageObject



34
35
36
37
38
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 34

def receive_text_message
  return false if @applicant.receiveTexts.nil?

  @applicant.receiveTexts
end

#school_nameObject



26
27
28
# File 'app/sidekiq/education_form/forms/va_10203.rb', line 26

def school_name
  @applicant.schoolName.upcase.strip
end