Sha256: 00a54bd9e8319789b42f19ed90e8982617f3d294c72c7e22e5dc898096a71a49

Contents?: true

Size: 263 Bytes

Versions: 27

Compression:

Stored size: 263 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    # Common functionality for checking integer nodes.
    module IntegerNode
      private

      def integer_part(node)
        node.source.sub(/^[+-]/, '').split('.').first
      end
    end
  end
end

Version data entries

27 entries across 25 versions & 3 rubygems

Version Path
rubocop-0.65.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.64.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.63.1 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.63.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.62.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.61.1 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.61.0 lib/rubocop/cop/mixin/integer_node.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/rubocop-0.60.0/lib/rubocop/cop/mixin/integer_node.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/rubocop-0.60.0/lib/rubocop/cop/mixin/integer_node.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/rubocop-0.60.0/lib/rubocop/cop/mixin/integer_node.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/rubocop-0.60.0/lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.60.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.59.2 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.59.1 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.59.0 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.58.2 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.58.1 lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.58.0 lib/rubocop/cop/mixin/integer_node.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rubocop-0.57.2/lib/rubocop/cop/mixin/integer_node.rb
rubocop-0.57.2 lib/rubocop/cop/mixin/integer_node.rb