Class: XlibObj::Event::Mask

Inherits:
Object
  • Object
show all
Defined in:
lib/event/mask.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMask

Returns a new instance of Mask.



3
4
5
# File 'lib/event/mask.rb', line 3

def initialize
  @mask = 0
end

Instance Attribute Details

#maskObject (readonly)

Returns the value of attribute mask.



7
8
9
# File 'lib/event/mask.rb', line 7

def mask
  @mask
end

Instance Method Details

#add(mask) ⇒ Object



9
10
11
# File 'lib/event/mask.rb', line 9

def add(mask)
  @mask |= mask
end

#subtract(mask) ⇒ Object



13
14
15
# File 'lib/event/mask.rb', line 13

def subtract(mask)
  @mask &= ~mask
end