class RuboCop::AST::IfNode

def inverse_keyword

Returns:
  • (String) - the inverse keyword of the `if` statement
def inverse_keyword
  if keyword == 'if'
    'unless'
  elsif keyword == 'unless'
    'if'
  else
    ''
  end
end