Class: Dsu::Presenters::Import::DatesPresenter
- Inherits:
-
BasePresenterEx
- Object
- BasePresenterEx
- Dsu::Presenters::Import::DatesPresenter
- Includes:
- ImportEntry, ImportFile
- Defined in:
- lib/dsu/presenters/import/dates_presenter.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#import_file_path ⇒ Object
readonly
Returns the value of attribute import_file_path.
-
#import_messages ⇒ Object
readonly
Returns the value of attribute import_messages.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(from:, to:, import_file_path:, options: {}) ⇒ DatesPresenter
constructor
A new instance of DatesPresenter.
- #project_name ⇒ Object
- #respond ⇒ Object
Methods included from ImportFile
#import_entry_groups_count, #import_file_path_exist?, #nothing_to_import?
Methods included from ImportEntry
Constructor Details
#initialize(from:, to:, import_file_path:, options: {}) ⇒ DatesPresenter
Returns a new instance of DatesPresenter.
18 19 20 21 22 23 24 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 18 def initialize(from:, to:, import_file_path:, options: {}) super(options: ) @from = from.beginning_of_day @to = to.end_of_day @import_file_path = import_file_path end |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
16 17 18 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 16 def from @from end |
#import_file_path ⇒ Object (readonly)
Returns the value of attribute import_file_path.
16 17 18 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 16 def import_file_path @import_file_path end |
#import_messages ⇒ Object (readonly)
Returns the value of attribute import_messages.
16 17 18 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 16 def @import_messages end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
16 17 18 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 16 def to @to end |
Instance Method Details
#project_name ⇒ Object
30 31 32 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 30 def project_name @project_name ||= Models::Project.current_project.project_name end |
#respond ⇒ Object
26 27 28 |
# File 'lib/dsu/presenters/import/dates_presenter.rb', line 26 def respond @import_messages = importer_service.call end |