Sha256: eeaa25284aaf5111335014dd8fe99e97e6989bf1060e25326424d4af08298ac2

Contents?: true

Size: 430 Bytes

Versions: 7093

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,093 entries across 7,057 versions & 51 rubygems

Version Path
cybrid_api_bank_ruby-0.123.135 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.135 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.134 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.134 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.134 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.132 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.131 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.129 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.127 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_bank_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_id_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb
cybrid_api_organization_ruby-0.123.126 vendor/bundle/ruby/3.3.0/gems/rubocop-0.66.0/lib/rubocop/ast/node/mixin/modifier_node.rb