Class: MetadataPresenter::PreviousPage
- Inherits:
-
Object
- Object
- MetadataPresenter::PreviousPage
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/metadata_presenter/previous_page.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#referrer ⇒ Object
Returns the value of attribute referrer.
-
#service ⇒ Object
Returns the value of attribute service.
-
#user_data ⇒ Object
Returns the value of attribute user_data.
Instance Method Summary collapse
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
4 5 6 |
# File 'app/models/metadata_presenter/previous_page.rb', line 4 def current_page @current_page end |
#referrer ⇒ Object
Returns the value of attribute referrer.
4 5 6 |
# File 'app/models/metadata_presenter/previous_page.rb', line 4 def referrer @referrer end |
#service ⇒ Object
Returns the value of attribute service.
4 5 6 |
# File 'app/models/metadata_presenter/previous_page.rb', line 4 def service @service end |
#user_data ⇒ Object
Returns the value of attribute user_data.
4 5 6 |
# File 'app/models/metadata_presenter/previous_page.rb', line 4 def user_data @user_data end |
Instance Method Details
#page ⇒ Object
6 7 8 9 10 |
# File 'app/models/metadata_presenter/previous_page.rb', line 6 def page return if no_current_or_referrer_pages? || service.no_back_link?(current_page) TraversedPages.new(service, user_data, current_page).last end |