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
24 25 26 |
# File 'app/models/period.rb', line 24 def length ends_at - starts_at end |
- (Object) range
20 21 22 |
# File 'app/models/period.rb', line 20 def range starts_at..ends_at end |