sleepy_penguin 3.5.2
[sleepy_penguin.git] / lib / sleepy_penguin / signalfd / sig_info.rb
blob5a5153608414ceb9bbb4728e2a10d8f681a632eb
1 class SleepyPenguin::SignalFD::SigInfo # :nodoc:
3   def to_hash
4     Hash[*MEMBERS.inject([]) { |ary,k| ary << k << __send__(k) }]
5   end
7   def hash
8     to_hash.hash
9   end
11   def inspect
12     "#<#{self.class}:#{to_hash.inspect}>"
13   end
15   def ==(other)
16     other.kind_of?(self.class) && to_hash == other.to_hash
17   end
18 end