Class: MetadataPresenter::NextPage

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/metadata_presenter/next_page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_page_urlObject

Returns the value of attribute current_page_url.



4
5
6
# File 'app/models/metadata_presenter/next_page.rb', line 4

def current_page_url
  @current_page_url
end

#previous_answersObject

Returns the value of attribute previous_answers.



4
5
6
# File 'app/models/metadata_presenter/next_page.rb', line 4

def previous_answers
  @previous_answers
end

#serviceObject

Returns the value of attribute service.



4
5
6
# File 'app/models/metadata_presenter/next_page.rb', line 4

def service
  @service
end

#sessionObject

Returns the value of attribute session.



4
5
6
# File 'app/models/metadata_presenter/next_page.rb', line 4

def session
  @session
end

#user_dataObject

Returns the value of attribute user_data.



4
5
6
# File 'app/models/metadata_presenter/next_page.rb', line 4

def user_data
  @user_data
end

Instance Method Details

#findObject



6
7
8
9
10
11
12
13
14
15
16
# File 'app/models/metadata_presenter/next_page.rb', line 6

def find
  return check_answers_page if return_to_check_your_answer?

  if conditionals?
    evaluate_branch_conditionals
  else
    service.find_page_by_uuid(current_page_flow.default_next)
  end
ensure
  session[:return_to_check_your_answer] = nil
end