Class: Slayer::CommandReturn
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- Slayer::CommandReturn
- Defined in:
- lib/slayer/cops/return_matcher.rb
Instance Method Summary collapse
Instance Method Details
#on_def(node) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/slayer/cops/return_matcher.rb', line 10 def on_def(node) return unless node.method?(:call) return unless in_slayer_command?(node) explicit_returns(node) do |n| validate_return! n.child_nodes.first, n end # Temporarily does not look at implicit returns # # implicit_returns(node) do |node| # validate_return! node # end end |