Class: RuboCop::GitlabSecurity::Concept

Inherits:
Object
  • Object
show all
Extended by:
NodePattern::Macros
Includes:
Language, Language::NodePattern
Defined in:
lib/rubocop/gitlab-security/concept.rb

Overview

Wrapper for RSpec DSL methods

Direct Known Subclasses

Example, ExampleGroup, Hook

Constant Summary

Constants included from Language

Language::ALL

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Concept



11
12
13
# File 'lib/rubocop/gitlab-security/concept.rb', line 11

def initialize(node)
  @node = node
end

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==



15
16
17
# File 'lib/rubocop/gitlab-security/concept.rb', line 15

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

#hashObject



21
22
23
# File 'lib/rubocop/gitlab-security/concept.rb', line 21

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

#to_nodeObject



25
26
27
# File 'lib/rubocop/gitlab-security/concept.rb', line 25

def to_node
  node
end