Class: WoopleTheme::Dashboard::PointsPresenter
- Inherits:
-
ExplicitDelegator
- Object
- ExplicitDelegator
- WoopleTheme::Dashboard::PointsPresenter
- Defined in:
- app/presenters/woople_theme/dashboard/points_presenter.rb
Instance Method Summary collapse
Methods inherited from ExplicitDelegator
enforce_definitions, #enforced_methods, #ensure_defined, #initialize
Constructor Details
This class inherits a constructor from ExplicitDelegator
Instance Method Details
#percent_complete ⇒ Object
8 9 10 11 12 |
# File 'app/presenters/woople_theme/dashboard/points_presenter.rb', line 8 def percent_complete return 100 if data.total.zero? ( (data.earned.to_f / data.total.to_f) * 100 ).round end |