Class: PAPI::Component
- Inherits:
-
Object
- Object
- PAPI::Component
- Defined in:
- lib/PAPI/Component.rb
Defined Under Namespace
Classes: Info
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#native ⇒ Object
Returns the value of attribute native.
-
#preset ⇒ Object
Returns the value of attribute preset.
Instance Method Summary collapse
-
#initialize(info, idx = 0) ⇒ Component
constructor
A new instance of Component.
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(info, idx = 0) ⇒ Component
Returns a new instance of Component.
56 57 58 59 |
# File 'lib/PAPI/Component.rb', line 56 def initialize(info, idx = 0) @info = info @idx = idx end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
52 53 54 |
# File 'lib/PAPI/Component.rb', line 52 def info @info end |
#native ⇒ Object
Returns the value of attribute native.
53 54 55 |
# File 'lib/PAPI/Component.rb', line 53 def native @native end |
#preset ⇒ Object
Returns the value of attribute preset.
54 55 56 |
# File 'lib/PAPI/Component.rb', line 54 def preset @preset end |
Instance Method Details
#to_i ⇒ Object
61 62 63 |
# File 'lib/PAPI/Component.rb', line 61 def to_i return @idx end |
#to_s ⇒ Object
65 66 67 |
# File 'lib/PAPI/Component.rb', line 65 def to_s @info[:name].to_ptr.read_string end |