class RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces
def check(token1, token2)
def check(token1, token2) # No offense if line break inside. return if token1.line < token2.line return if token2.comment? # Also indicates there's a line break. is_empty_braces = token1.left_brace? && token2.right_curly_brace? expect_space = expect_space?(token1, token2) if offense?(token1, expect_space) incorrect_style_detected(token1, token2, expect_space, is_empty_braces) else correct_style_detected end end