class RuboCop::AST::IfNode

def inverse_keyword

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