Class: Dsu::Presenters::Export::AllPresenter

Inherits:
BasePresenterEx show all
Defined in:
lib/dsu/presenters/export/all_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BasePresenterEx

#initialize

Constructor Details

This class inherits a constructor from Dsu::Presenters::BasePresenterEx

Instance Attribute Details

#export_file_pathObject (readonly)

Returns the value of attribute export_file_path.



11
12
13
# File 'lib/dsu/presenters/export/all_presenter.rb', line 11

def export_file_path
  @export_file_path
end

Instance Method Details

#entry_group_countObject



23
24
25
# File 'lib/dsu/presenters/export/all_presenter.rb', line 23

def entry_group_count
  entry_groups&.count || 0
end

#nothing_to_export?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/dsu/presenters/export/all_presenter.rb', line 19

def nothing_to_export?
  entry_group_count.zero?
end

#respond(response:) ⇒ Object



13
14
15
16
17
# File 'lib/dsu/presenters/export/all_presenter.rb', line 13

def respond(response:)
  return false unless response

  @export_file_path = exporter_service.call
end