mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
4bd8916b12
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@674688 13f79535-47bb-0310-9956-ffa450edef68
17 lines
451 B
Ruby
17 lines
451 B
Ruby
$:.unshift File.dirname(__FILE__) + '/gen-rb'
|
|
$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/lib')
|
|
$:.unshift File.join(File.dirname(__FILE__), '../../lib/rb/ext')
|
|
|
|
require 'test/unit'
|
|
|
|
module Thrift
|
|
module Struct
|
|
def ==(other)
|
|
return false unless other.is_a? self.class
|
|
self.class.const_get(:FIELDS).collect {|fid, data| data[:name] }.all? do |field|
|
|
send(field) == other.send(field)
|
|
end
|
|
end
|
|
end
|
|
end
|