Class: Hwloc::BoolStruct
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Hwloc::BoolStruct
- Defined in:
- lib/hwloc/Obj.rb
Direct Known Subclasses
TopologyCpubindSupport, TopologyDiscoverySupport, TopologyMemSupport
Instance Attribute Summary collapse
-
#topology ⇒ Object
readonly
Returns the value of attribute topology.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
98 99 100 101 102 103 104 |
# File 'lib/hwloc/Obj.rb', line 98 def method_missing(m, *args, &block) begin return self[m] == 1 rescue super end end |
Instance Attribute Details
#topology ⇒ Object (readonly)
Returns the value of attribute topology.
116 117 118 |
# File 'lib/hwloc/Obj.rb', line 116 def topology @topology end |
Instance Method Details
#each ⇒ Object
106 107 108 109 110 111 112 113 114 |
# File 'lib/hwloc/Obj.rb', line 106 def each if block_given? then members.each { |m| yield m, (self[m] ==1) } else to_enum(:each) end end |