Module: RuboCop::AST::ModifierNode

Included in:
IfNode, UntilNode, WhileNode
Defined in:
lib/rubocop/ast/node/mixin/modifier_node.rb

Overview

Common functionality for nodes that can be used as modifiers: `if`, `while`, `until`

Instance Method Summary collapse

Instance Method Details

#modifier_form?Boolean

Checks whether the node is in a modifier form, i.e. a condition trailing behind an expression.

Returns:

  • (Boolean)

    whether the node is a modifier


12
13
14
# File 'lib/rubocop/ast/node/mixin/modifier_node.rb', line 12

def modifier_form?
  loc.end.nil?
end