Class: RuboCop::Cop::Decko::EventLength

Inherits:
RuboCop::Cop show all
Includes:
BlockLength
Defined in:
lib/rubocop/cop/decko/event_length.rb

Overview

Checks that the lines of a view block don’t exceed the allowed maximum

Examples:

view :editor do |args|
   ...
end

Instance Method Summary collapse

Methods included from BlockLength

#check_code_length

Instance Method Details

#on_block(node) ⇒ Object



14
15
16
17
18
19
# File 'lib/rubocop/cop/decko/event_length.rb', line 14

def on_block(node)
  method, args, body = *node
  _receiver, method_name, _args = *method
  return unless method_name == :event
  check_code_length(node, body)
end