Method: RuboCop::Cop::Gemspec::DependencyVersion#on_send

Defined in:
lib/rubocop/cop/gemspec/dependency_version.rb

#on_send(node) ⇒ Object


82
83
84
85
86
87
88
89
90
91
92
# File 'lib/rubocop/cop/gemspec/dependency_version.rb', line 82

def on_send(node)
  return unless add_dependency_method_declaration?(node)
  return if allowed_gem?(node)

  if offense?(node)
    add_offense(node)
    opposite_style_detected
  else
    correct_style_detected
  end
end