Class: ODDB::NotificationLogger::LogEntry

Inherits:
Object
  • Object
show all
Defined in:
src/util/notification_logger.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (LogEntry) initialize(sender, recipient, time)

A new instance of LogEntry



12
13
14
15
16
# File 'src/util/notification_logger.rb', line 12

def initialize(sender, recipient, time)
  @sender = sender
  @recipient = recipient
  @time = time 
end

Instance Attribute Details

- (Object) recipient (readonly)

Returns the value of attribute recipient



11
12
13
# File 'src/util/notification_logger.rb', line 11

def recipient
  @recipient
end

- (Object) sender (readonly)

Returns the value of attribute sender



11
12
13
# File 'src/util/notification_logger.rb', line 11

def sender
  @sender
end

- (Object) time (readonly)

Returns the value of attribute time



11
12
13
# File 'src/util/notification_logger.rb', line 11

def time
  @time
end

Instance Method Details

- (Object) <=>(other)



23
24
25
26
27
28
# File 'src/util/notification_logger.rb', line 23

def <=>(other)
  if(other.respond_to?(:time))
    other = other.time
  end
  @time <=> other
end

- (Object) month



17
18
19
# File 'src/util/notification_logger.rb', line 17

def month
  @time.month
end

- (Object) year



20
21
22
# File 'src/util/notification_logger.rb', line 20

def year
  @time.year
end