Class: Troo::Refresh
- Inherits:
-
Ohm::Model
- Object
- Ohm::Model
- Troo::Refresh
show all
- Includes:
- Ohm::DataTypes, ModelHelpers
- Defined in:
- lib/troo/models/refresh.rb
Class Method Summary
collapse
#external_attributes, included
Class Method Details
.completed! ⇒ Object
13
14
15
16
|
# File 'lib/troo/models/refresh.rb', line 13
def completed!
all.map { |record| record.delete }
create({ last_performed_at: Time.now.to_s })
end
|
18
19
20
|
# File 'lib/troo/models/refresh.rb', line 18
def last_performed_at?
first ? first.last_performed_at? : nil
end
|