12 lines
237 B
Ruby
12 lines
237 B
Ruby
class Event
|
|
attr_reader :begin_at, :end_at
|
|
|
|
def initialize
|
|
@begin_at = DateTime.now.beginning_of_day
|
|
@end_at = DateTime.now + 1.day
|
|
end
|
|
|
|
def during?(d)
|
|
self.begin_at <= d && d <= self.end_at
|
|
end
|
|
end |