lib/rb-inotify/native/flags.rb in rb-inotify-0.2.1 vs lib/rb-inotify/native/flags.rb in rb-inotify-0.3.0
- old
+ new
@@ -66,18 +66,18 @@
IN_ISDIR = 0x40000000
# Converts a list of flags to the bitmask that the C API expects.
#
# @param flags [Array<Symbol>]
- # @return Fixnum
+ # @return [Fixnum]
def self.to_mask(flags)
flags.map {|flag| const_get("IN_#{flag.to_s.upcase}")}.
inject(0) {|mask, flag| mask | flag}
end
# Converts a bitmask from the C API into a list of flags.
#
- # @return mask [Fixnum]
+ # @param mask [Fixnum]
# @return [Array<Symbol>]
def self.from_mask(mask)
constants.select do |c|
next false unless c =~ /^IN_/
const_get(c) & mask != 0