Class: Period
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Period
- Defined in:
- app/models/period.rb
Overview
A range of time.
Schema Information
Table name: periods
id :integer not null, primary key
starts_at :datetime not null
created_at :datetime not null
updated_at :datetime not null
ends_at :datetime not null
Instance Method Summary (collapse)
Instance Method Details
- (Object) length
22 23 24 |
# File 'app/models/period.rb', line 22 def length ends_at - starts_at end |