Module: CPUID::Features
- Included in:
- CPUID
- Defined in:
- lib/cpuid/features.rb
Constant Summary
collapse
- SIGNATURE_FEATURES_FN =
1
- EXT_FEATURE_FN =
0x80000001
- POWER_MANAGEMENT_FN =
0x80000007
- INTEL_SYSCALL_CHECK_BIT =
1 << 11
- INTEL_XD_CHECK_BIT =
1 << 20
- INTEL_64_CHECK_BIT =
1 << 29
- INTEL_LAHF_CHECK_BIT =
1
- INTEL_TSC_INVARIANCE_CHECK_BIT =
1 << 7
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/cpuid/features.rb', line 34
def method_missing(meth, *args, &block)
if features.include?(meth)
features[meth]
elsif meth.to_s[-1,1] == "?" && features.include?(meth.to_s[0..-2].to_sym)
features[meth.to_s[0..-2].to_sym]
else
super(meth, *args, &block)
end
end
|
Instance Method Details
#features ⇒ Object
13
14
15
|
# File 'lib/cpuid/features.rb', line 13
def features
@features ||= load_features
end
|