Class: RuboCop::Cop::SketchupDeprecations::SketchupSet

Inherits:
SketchUp::Cop show all
Defined in:
lib/rubocop/sketchup/cop/deprecations/sketchup_set.rb

Overview

From SketchUp 6 until SketchUp 2013 the SketchUp API shipped with a ‘Set` class. When SketchUp started shipping with the Ruby StdLib in SketchUp 2014 the class was changed from `Set` to `Sketchup::Set` in order to avoid conflict with the Ruby Standard Library.

The ‘Sketchup::Set` class is much slower than Ruby’s own ‘Set` class and less versatile.

Constant Summary collapse

MSG =
'Class is deprecated.'

Constants inherited from SketchUp::Cop

SketchUp::Cop::SKETCHUP_DEPARTMENT_SEVERITY

Constants included from SketchUp::Config

SketchUp::Config::DEFAULT_CONFIGURATION

Instance Method Summary collapse

Methods inherited from SketchUp::Cop

inherited, #relevant_file?

Instance Method Details

#on_const(node) ⇒ Object



21
22
23
24
25
# File 'lib/rubocop/sketchup/cop/deprecations/sketchup_set.rb', line 21

def on_const(node)
  return unless sketchup_set?(node)

  add_offense(node, location: :expression)
end