class RuboCop::AST::BlockNode

def single_line?

Returns:
  • (Boolean) - whether the `block` literal is on a single line
def single_line?
  loc.begin.line == loc.end.line
end