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.
Class Method Summary collapse
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.
19 20 21 22 |
# File 'lib/screen/crtc/output.rb', line 19 def initialize(crtc, id) @crtc = crtc @id = id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
31 32 33 |
# File 'lib/screen/crtc/output.rb', line 31 def method_missing(name) attribute(name) end |
Instance Attribute Details
#crtc ⇒ Object (readonly)
Returns the value of attribute crtc.
24 25 26 |
# File 'lib/screen/crtc/output.rb', line 24 def crtc @crtc end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
24 25 26 |
# File 'lib/screen/crtc/output.rb', line 24 def id @id end |
Class Method Details
.finalize(attributes) ⇒ Object
14 15 16 |
# File 'lib/screen/crtc/output.rb', line 14 def finalize(attributes) proc{ Xlib.XRRFreeOutputInfo(attributes.pointer) } end |
Instance Method Details
#attribute(attribute) ⇒ Object
26 27 28 29 |
# File 'lib/screen/crtc/output.rb', line 26 def attribute(attribute) return unless attributes.layout.members.include? attribute.to_sym attributes[attribute.to_sym] end |