Class: Spear::Structure::Application::Blank

Inherits:
Base
  • Object
show all
Includes:
EmbededClass
Defined in:
lib/spear/structure/application/blank.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#error_message, #response, #root, #status

Instance Method Summary collapse

Methods included from EmbededClass

#generate_apps, #generate_questions

Methods inherited from Base

#success?

Constructor Details

#initialize(response) ⇒ Blank

Returns a new instance of Blank.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/spear/structure/application/blank.rb', line 11

def initialize(response)
  super(response)

  blank_application = @root['BlankApplication']

  unless blank_application.nil?
    @job_did = blank_application['JobDID']
    @job_title = blank_application['JobTitle']
    @total_questions = blank_application['TotalQuestions']
    @total_required_questions = blank_application['TotalRequiredQuestions']
    @application_submit_service_url = blank_application['ApplicationSubmitServiceURL']
    @apply_url = blank_application['ApplyURL']

    @questions = generate_questions(blank_application['Questions']['Question']) rescue nil
  end
end

Instance Attribute Details

#application_submit_service_urlObject (readonly)

Returns the value of attribute application_submit_service_url.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def application_submit_service_url
  @application_submit_service_url
end

#apply_urlObject (readonly)

Returns the value of attribute apply_url.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def apply_url
  @apply_url
end

#job_didObject (readonly)

Returns the value of attribute job_did.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def job_did
  @job_did
end

#job_titleObject (readonly)

Returns the value of attribute job_title.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def job_title
  @job_title
end

#questionsObject

Returns the value of attribute questions.



9
10
11
# File 'lib/spear/structure/application/blank.rb', line 9

def questions
  @questions
end

#total_questionsObject (readonly)

Returns the value of attribute total_questions.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def total_questions
  @total_questions
end

#total_required_questionsObject (readonly)

Returns the value of attribute total_required_questions.



7
8
9
# File 'lib/spear/structure/application/blank.rb', line 7

def total_required_questions
  @total_required_questions
end