Class: Ruby::Reports::Services::EventsHandler
- Inherits:
-
Object
- Object
- Ruby::Reports::Services::EventsHandler
- Defined in:
- lib/ruby/reports/services/events_handler.rb
Constant Summary collapse
- PROGRESS_STEP =
10
Instance Method Summary collapse
Instance Method Details
#error ⇒ Object
17 18 19 |
# File 'lib/ruby/reports/services/events_handler.rb', line 17 def error error_callback ? error_callback.call($ERROR_INFO) : fail end |
#progress(progress, total, force = false) ⇒ Object
11 12 13 14 15 |
# File 'lib/ruby/reports/services/events_handler.rb', line 11 def progress(progress, total, force = false) if progress_callback && (force || progress % PROGRESS_STEP == 0) progress_callback.call progress, total end end |