class RuboCop::Cop::SketchupRequirements::GemInstall

It's tempting to use gems in an extension. However, there are issues if consuming them via Gem.install;

They only way to ensure extensions doesn't clash is to namespace everything into extension namespace. This means making a copy of the gem you want to use and wrap it in your own namespace.

Constants

MSG

Public Instance Methods

on_send(node) click to toggle source
# File lib/rubocop/sketchup/cop/requirements/gem_install.rb, line 36
def on_send(node)
  return unless gem_install?(node)

  range = range_with_receiver(node)
  add_offense(node, location: range)
end