Class: Integer

Inherits:
Object show all
Defined in:
lib/moon/packages/std/core_ext/integer.rb

Instance Method Summary collapse

Instance Method Details

#masked?(flag) ⇒ Boolean

Returns:


2
3
4
5
6
7
8
# File 'lib/moon/packages/std/core_ext/integer.rb', line 2

def masked?(flag)
  if flag == 0
    self == 0
  else
    (self & flag) == flag
  end
end