Method: Wpxf::Net::UserAgent#random_processor_string

Defined in:
lib/wpxf/net/user_agent.rb

#random_processor_string(os) ⇒ String

A random CPU type.

Parameters:

  • os

    the operating system that the CPU would be used with.

Returns:

  • (String)

    a random CPU type.



64
65
66
67
# File 'lib/wpxf/net/user_agent.rb', line 64

def random_processor_string(os)
  return ['i686', 'x86_64'].sample if os == :linux
  return ['Intel', 'PPC', 'U; Intel', 'U; PPC'].sample if os == :osx
end