Sha256: c380bbb39c9d415c82eff4ef6867da687a551e59a7034bb2dc50266a7b8f832f

Contents?: true

Size: 497 Bytes

Versions: 6

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module RSpec
    # Wrapper for RSpec DSL methods
    class Concept
      include Language, Language::NodePattern
      extend NodePattern::Macros

      def initialize(node)
        @node = node
      end

      def eql?(other)
        node.eql?(other.node)
      end

      alias == eql?

      def hash
        [self.class, node].hash
      end

      def to_node
        node
      end

      protected

      attr_reader :node
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubocop-rspec-1.15.0 lib/rubocop/rspec/concept.rb
rubocop-rspec-1.14.0 lib/rubocop/rspec/concept.rb
rubocop-rspec-1.13.0 lib/rubocop/rspec/concept.rb
rubocop-rspec-1.12.0 lib/rubocop/rspec/concept.rb
rubocop-rspec-1.11.0 lib/rubocop/rspec/concept.rb
rubocop-rspec-1.10.0 lib/rubocop/rspec/concept.rb