Class: Renalware::HD::Session
Defined Under Namespace
Classes: Closed, DNA, Open
Instance Method Summary
collapse
#first_or_create_by!, #save_by, #save_by!, #update_by
Instance Method Details
#compute_duration ⇒ Object
63
64
65
66
67
|
# File 'app/models/renalware/hd/session.rb', line 63
def compute_duration
return unless start_time_changed? || end_time_changed?
self.duration = DurationCalculator.in_minutes(start_time, end_time)
end
|
#start_datetime ⇒ Object
55
56
57
|
# File 'app/models/renalware/hd/session.rb', line 55
def start_datetime
datetime_at(start_time)
end
|
#stop_datetime ⇒ Object
59
60
61
|
# File 'app/models/renalware/hd/session.rb', line 59
def stop_datetime
datetime_at(end_time)
end
|