Class: RuboCop::Cop::Mirego::ExplicitReturnValue

Inherits:
RuboCop::Cop
  • Object
show all
Defined in:
lib/rubocop/cop/mirego/explicit_return_value.rb

Constant Summary collapse

MESSAGE =
'Always specify a value with `return`'.freeze

Instance Method Summary collapse

Instance Method Details

#on_def(node) ⇒ Object



7
8
9
10
# File 'lib/rubocop/cop/mirego/explicit_return_value.rb', line 7

def on_def(node)
  _, _, body = *node
  check(node: body)
end

#on_defs(node) ⇒ Object



12
13
14
15
# File 'lib/rubocop/cop/mirego/explicit_return_value.rb', line 12

def on_defs(node)
  _, _, _, body = *node
  check(node: body)
end