diff options
| author | Mike McQuaid | 2016-07-16 22:15:42 +0100 | 
|---|---|---|
| committer | Mike McQuaid | 2016-07-29 21:21:29 -0600 | 
| commit | b950966bdde86e6bc059d08c3b18852e369e09bb (patch) | |
| tree | 7f5d2e03c014af073c79a1af95a2807ea993b64b /Library/Homebrew/compat/hardware.rb | |
| parent | e107c86aecc8f53a254c0e8582a5db87c1bd7fdf (diff) | |
| download | brew-b950966bdde86e6bc059d08c3b18852e369e09bb.tar.bz2 | |
compat/hardware: cleanup style.
Diffstat (limited to 'Library/Homebrew/compat/hardware.rb')
| -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 | 
