Class: XlibObj::Atom
- Inherits:
-
Object
- Object
- XlibObj::Atom
- Defined in:
- lib/atom.rb
Instance Attribute Summary collapse
-
#to_native ⇒ Object
readonly
Returns the value of attribute to_native.
Instance Method Summary collapse
- #exists? ⇒ Boolean
-
#initialize(display, atom) ⇒ Atom
constructor
A new instance of Atom.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#to_native ⇒ Object (readonly)
Returns the value of attribute to_native.
20 21 22 |
# File 'lib/atom.rb', line 20 def to_native @to_native end |
Instance Method Details
#exists? ⇒ Boolean
26 27 28 |
# File 'lib/atom.rb', line 26 def exists? @to_native != 0 end |
#name ⇒ Object
22 23 24 |
# File 'lib/atom.rb', line 22 def name Xlib.XGetAtomName(@display.to_native, @to_native).to_sym end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/atom.rb', line 30 def to_s name.to_s end |