Class: Actions::Pulp::Repository::Presenters::OstreePresenter

Inherits:
AbstractSyncPresenter show all
Defined in:
app/lib/actions/pulp/repository/presenters/ostree_presenter.rb

Instance Attribute Summary

Attributes inherited from Helpers::Presenter::Base

#action

Instance Method Summary collapse

Methods inherited from AbstractSyncPresenter

#humanized_output

Methods inherited from Helpers::Presenter::Base

#humanized_output, #initialize

Constructor Details

This class inherits a constructor from Actions::Helpers::Presenter::Base

Instance Method Details

#progressObject



6
7
8
9
10
11
12
13
14
# File 'app/lib/actions/pulp/repository/presenters/ostree_presenter.rb', line 6

def progress
  return 0.01 unless task_progress_details

  completion = 0.0
  completion += 0.4 if content_completed?(details("import_create_repository"))
  completion += 0.3 if content_completed?(details("import_pull"))
  completion += 0.3 if content_completed?(details("import_add_unit"))
  completion
end