Sha256: 393d64f8a9aef686a482d6cf5bcc4fc8f49b7ce89f6bf573836febb1cac5a031
Contents?: true
Size: 413 Bytes
Versions: 36
Compression:
Stored size: 413 Bytes
Contents
module Flydata module Mysql class BinLogPosition include Comparable attr_accessor :file, :pos def initialize(binlog_content) items = binlog_content.split("\t") @file = items[0] @pos = items[1].to_i end def <=>(obj) (self.file <=> obj.file) == 0 ? (self.pos <=> obj.pos) : (self.file <=> obj.file) end def to_s "#{file}\t#{pos}" end end end end
Version data entries
36 entries across 36 versions & 1 rubygems