Class: LogWeaver::ParsedLogKey

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/log_weaver/parsed_log_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countObject

Returns the value of attribute count

Returns:

  • (Object)

    the current value of count



2
3
4
# File 'lib/log_weaver/parsed_log_key.rb', line 2

def count
  @count
end

#prefixObject

Returns the value of attribute prefix

Returns:

  • (Object)

    the current value of prefix



2
3
4
# File 'lib/log_weaver/parsed_log_key.rb', line 2

def prefix
  @prefix
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of timestamp



2
3
4
# File 'lib/log_weaver/parsed_log_key.rb', line 2

def timestamp
  @timestamp
end

Instance Method Details

#<=>(other) ⇒ Object



5
6
7
8
9
# File 'lib/log_weaver/parsed_log_key.rb', line 5

def <=>(other)
  return timestamp <=> other.timestamp unless timestamp == other.timestamp
  return count <=> other.count unless count == other.count
  prefix <=> other.prefix
end