123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::AST::ModifierNode

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
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 Attribute Summary

Instance Attribute Details

#modifier_form?Boolean (readonly)

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

[ GitHub ]

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

def modifier_form?
  loc.end.nil?
end