Class: XlibObj::Event::Mask
- Inherits:
-
Object
- Object
- XlibObj::Event::Mask
- Defined in:
- lib/event/mask.rb
Instance Attribute Summary collapse
-
#mask ⇒ Object
readonly
Returns the value of attribute mask.
Instance Method Summary collapse
- #add(mask) ⇒ Object
-
#initialize ⇒ Mask
constructor
A new instance of Mask.
- #subtract(mask) ⇒ Object
Constructor Details
#initialize ⇒ Mask
Returns a new instance of Mask.
3 4 5 |
# File 'lib/event/mask.rb', line 3 def initialize @mask = 0 end |
Instance Attribute Details
#mask ⇒ Object (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 |