Sha256: eeaa25284aaf5111335014dd8fe99e97e6989bf1060e25326424d4af08298ac2

Contents?: true

Size: 430 Bytes

Versions: 7094

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    # Common functionality for nodes that can be used as modifiers:
    # `if`, `while`, `until`
    module ModifierNode
      # Checks whether the node is in a modifier form, i.e. a condition
      # trailing behind an expression.
      #
      # @return [Boolean] whether the node is a modifier
      def modifier_form?
        loc.end.nil?
      end
    end
  end
end

Version data entries

7,094 entries across 7,058 versions & 51 rubygems

Version Path
rubocop-ast-0.0.2 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-ast-0.0.1 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.83.0 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.82.0 lib/rubocop/ast/node/mixin/modifier_node.rb
talon_one-2.0.0 vendor/bundle/ruby/2.7.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
talon_one-2.0.0 vendor/bundle/ruby/2.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.81.0 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.80.1 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.80.0 lib/rubocop/ast/node/mixin/modifier_node.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.6.0/gems/rubocop-0.79.0/lib/rubocop/ast/node/mixin/modifier_node.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/rubocop-0.79.0/lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.79.0 lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.78.0 lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.74.0/lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.72.0/lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.77.0/lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.76.0/lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.1/lib/rubocop/ast/node/mixin/modifier_node.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/rubocop-0.75.0/lib/rubocop/ast/node/mixin/modifier_node.rb
rubocop-0.77.0 lib/rubocop/ast/node/mixin/modifier_node.rb