diff options
| -rw-r--r-- | Library/Homebrew/compat/hardware.rb | 26 | 
1 files changed, 18 insertions, 8 deletions
| diff --git a/Library/Homebrew/compat/hardware.rb b/Library/Homebrew/compat/hardware.rb index 5c46a3d3c..07a63f048 100644 --- a/Library/Homebrew/compat/hardware.rb +++ b/Library/Homebrew/compat/hardware.rb @@ -1,32 +1,42 @@  module Hardware    class << self -    # We won't change the name because of backward compatibility. -    # So disable rubocop here. -    def is_32_bit? # rubocop:disable Style/PredicateName +    def is_32_bit? +      odeprecated "Hardware.is_32_bit?", "Hardware::CPU.is_32_bit?"        !CPU.is_64_bit?      end -    # We won't change the name because of backward compatibility. -    # So disable rubocop here. -    def is_64_bit? # rubocop:disable Style/PredicateName +    def is_64_bit? +      odeprecated "Hardware.is_64_bit?", "Hardware::CPU.is_64_bit?"        CPU.is_64_bit?      end      def bits +      odeprecated "Hardware.bits", "Hardware::CPU.bits"        Hardware::CPU.bits      end      def cpu_type +      odeprecated "Hardware.cpu_type", "Hardware::CPU.type"        Hardware::CPU.type      end      def cpu_family +      odeprecated "Hardware.cpu_family", "Hardware::CPU.family" +      Hardware::CPU.family +    end + +    def intel_family +      odeprecated "Hardware.intel_family", "Hardware::CPU.family" +      Hardware::CPU.family +    end + +    def ppc_family +      odeprecated "Hardware.ppc_family", "Hardware::CPU.family"        Hardware::CPU.family      end -    alias_method :intel_family, :cpu_family -    alias_method :ppc_family, :cpu_family      def processor_count +      odeprecated "Hardware.processor_count", "Hardware::CPU.cores"        Hardware::CPU.cores      end    end | 
