Class: SleepyPenguin::SignalFD::SigInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/sleepy_penguin/signalfd/sig_info.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/sleepy_penguin/signalfd/sig_info.rb', line 15

def ==(other)
  other.kind_of?(self.class) && to_hash == other.to_hash
end

#hashObject



7
8
9
# File 'lib/sleepy_penguin/signalfd/sig_info.rb', line 7

def hash
  to_hash.hash
end

#inspectObject



11
12
13
# File 'lib/sleepy_penguin/signalfd/sig_info.rb', line 11

def inspect
  "#<#{self.class}:#{to_hash.inspect}>"
end

#to_hashObject



3
4
5
# File 'lib/sleepy_penguin/signalfd/sig_info.rb', line 3

def to_hash
  Hash[*MEMBERS.inject([]) { |ary,k| ary << k << __send__(k) }]
end