Class: Hwloc::Struct
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Hwloc::Struct
- Defined in:
- lib/hwloc/Obj.rb
Direct Known Subclasses
AnonBridgeAttrDownstreamStruct, BridgeAttr, CacheAttr, Distances, GroupAttr, Obj, ObjInfo, ObjMemory, ObjMemoryPageType, OsdevAttr, PcidevAttr, TopologySupport
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
68 69 70 71 72 73 74 |
# File 'lib/hwloc/Obj.rb', line 68 def method_missing(m, *args, &block) begin return self[m] rescue super end end |
Instance Attribute Details
#topology ⇒ Object (readonly)
Returns the value of attribute topology.
82 83 84 |
# File 'lib/hwloc/Obj.rb', line 82 def topology @topology end |
Instance Method Details
#[](symbol) ⇒ Object
76 77 78 79 80 |
# File 'lib/hwloc/Obj.rb', line 76 def [](symbol) o = super o.instance_variable_set(:@topology, @topology) if o.kind_of?(Hwloc::Struct) || o.kind_of?(Hwloc::Union) return o end |