Module: Asyncable
- Defined in:
- lib/asyncable.rb,
lib/asyncable/version.rb,
lib/asyncable/active_record_scopes.rb
Defined Under Namespace
Modules: ActiveRecordScopes, Statuses
Constant Summary
collapse
- VERSION =
"0.1.5"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.handle_asynchronously(method) ⇒ Object
12
13
|
# File 'lib/asyncable.rb', line 12
def self.handle_asynchronously(method)
end
|
Instance Method Details
#failed? ⇒ Boolean
26
27
28
|
# File 'lib/asyncable.rb', line 26
def failed?
status == Statuses::FAILED
end
|
#processing? ⇒ Boolean
30
31
32
|
# File 'lib/asyncable.rb', line 30
def processing?
status == Statuses::PROCESSING
end
|
#start_async ⇒ Object
16
17
18
19
20
|
# File 'lib/asyncable.rb', line 16
def start_async
self.status = Statuses::PROCESSING
save_to_db
process_in_background
end
|
#succeeded? ⇒ Boolean
22
23
24
|
# File 'lib/asyncable.rb', line 22
def succeeded?
status == Statuses::SUCCEEDED
end
|