Class: AreWeThereYet::Run
- Inherits:
-
Object
- Object
- AreWeThereYet::Run
- Defined in:
- lib/are_we_there_yet/run.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/are_we_there_yet/run.rb', line 3 def id @id end |
Instance Method Details
#finish(database) ⇒ Object
8 9 10 |
# File 'lib/are_we_there_yet/run.rb', line 8 def finish(database) database[:runs].where(:id => id).update(:ended_at => Time.now.utc) end |
#start(database) ⇒ Object
4 5 6 |
# File 'lib/are_we_there_yet/run.rb', line 4 def start(database) @id = database[:runs].insert(:started_at => Time.now.utc) end |