Class: ActiveWindowX::Atom
- Defined in:
- lib/active_window_x/atom.rb,
lib/active_window_x.rb
Overview
binding for Atom on X11
Constant Summary collapse
- @@cache =
{}
Instance Attribute Summary
Attributes inherited from Xid
Instance Method Summary collapse
-
#initialize(display, second) ⇒ Atom
constructor
A new instance of Atom.
- #name ⇒ Object
Methods inherited from Xid
Constructor Details
#initialize(display, second) ⇒ Atom
Returns a new instance of Atom.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/active_window_x/atom.rb', line 9 def initialize display, second if second.kind_of? Numeric super elsif second.kind_of? String super @id = display.intern_atom second if @id == Xlib::None raise ArgumentError, 'invalid an atom name: #{second}' end else raise ArgumentError, 'expect Numeric or String with the second argument' end end |
Instance Method Details
#name ⇒ Object
25 26 27 |
# File 'lib/active_window_x/atom.rb', line 25 def name @display.atom_name @id end |