class RuboCop::Cop::Metrics::BlockLength

monkeypatch rubocop's block length cop so that it ignores format blocks. It doesn't work if I use the same path (“cop/metrics/block_length”) for this.

Public Instance Methods

on_block(node) click to toggle source
# File lib/rubocop/cop/decko/block_length.rb, line 12
def on_block(node)
  check_block_length node, except: [:format, :view, :event]
end