Class: Facter::Processors::Darwin
- Defined in:
- lib/facter/processors/os.rb
Instance Method Summary collapse
- #get_processor_count ⇒ Object
- #get_processor_speed ⇒ Object
-
#initialize ⇒ Darwin
constructor
A new instance of Darwin.
Methods inherited from Base
#get_physical_processor_count, #get_processor_list
Constructor Details
#initialize ⇒ Darwin
Returns a new instance of Darwin.
146 147 148 149 |
# File 'lib/facter/processors/os.rb', line 146 def initialize require "cfpropertylist" @system_hardware_data = query_system_profiler end |
Instance Method Details
#get_processor_count ⇒ Object
151 152 153 |
# File 'lib/facter/processors/os.rb', line 151 def get_processor_count Facter::Util::POSIX.sysctl("hw.ncpu").to_i end |
#get_processor_speed ⇒ Object
155 156 157 |
# File 'lib/facter/processors/os.rb', line 155 def get_processor_speed @system_hardware_data["current_processor_speed"] end |