Class: RuboCop::Cop::Homebrew::MoveToExtendOS Private

Inherits:
Base
  • Object
show all
Defined in:
rubocops/platform.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

This cop ensures that platform specific code ends up in extend/os.

Constant Summary collapse

MSG =

This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.

"Move `OS.linux?` and `OS.mac?` calls to `extend/os`."

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



17
18
19
20
21
# File 'rubocops/platform.rb', line 17

def on_send(node)
  return unless os_check?(node)

  add_offense(node)
end