Class: XlibObj::Screen::Crtc::Output
- Inherits:
-
Object
- Object
- XlibObj::Screen::Crtc::Output
- Defined in:
- lib/screen/crtc/output.rb
Instance Attribute Summary collapse
-
#crtc ⇒ Object
readonly
Returns the value of attribute crtc.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #attribute(attribute) ⇒ Object
-
#initialize(crtc, id) ⇒ Output
constructor
A new instance of Output.
- #method_missing(name) ⇒ Object
Constructor Details
#initialize(crtc, id) ⇒ Output
Returns a new instance of Output.
13 14 15 16 17 18 19 20 |
# File 'lib/screen/crtc/output.rb', line 13 def initialize(crtc, id) @crtc = crtc @id = id ObjectSpace.define_finalizer(self) do Xlib.XRRFreeOutputInfo(@attributes.pointer) if @attributes end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
29 30 31 |
# File 'lib/screen/crtc/output.rb', line 29 def method_missing(name) attribute(name) end |
Instance Attribute Details
#crtc ⇒ Object (readonly)
Returns the value of attribute crtc.
22 23 24 |
# File 'lib/screen/crtc/output.rb', line 22 def crtc @crtc end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/screen/crtc/output.rb', line 22 def id @id end |
Instance Method Details
#attribute(attribute) ⇒ Object
24 25 26 27 |
# File 'lib/screen/crtc/output.rb', line 24 def attribute(attribute) return unless attributes.layout.members.include? attribute.to_sym attributes[attribute.to_sym] end |