Class: Achoo::System::LogEntry

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/achoo/system/log_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time, event) ⇒ LogEntry

Returns a new instance of LogEntry.



12
13
14
15
# File 'lib/achoo/system/log_entry.rb', line 12

def initialize(time, event)
  @time  = time
  @event = event
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



10
11
12
# File 'lib/achoo/system/log_entry.rb', line 10

def event
  @event
end

#timeObject (readonly)

Returns the value of attribute time.



9
10
11
# File 'lib/achoo/system/log_entry.rb', line 9

def time
  @time
end

Instance Method Details

#<=>(other_entry) ⇒ Object



17
18
19
# File 'lib/achoo/system/log_entry.rb', line 17

def <=>(other_entry)
  time <=> other_entry.time
end