Class: RuboCop::RSpec::Concept
- Inherits:
-
Object
- Object
- RuboCop::RSpec::Concept
- Extended by:
- NodePattern::Macros
- Includes:
- Language
- Defined in:
- lib/rubocop/rspec/concept.rb
Overview
Wrapper for RSpec DSL methods
Direct Known Subclasses
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(node) ⇒ Concept
constructor
A new instance of Concept.
- #to_node ⇒ Object
Methods included from Language
#example?, #example_group?, #example_group_with_body?, #explicit_rspec?, #hook?, #include?, #let?, #rspec?, #shared_group?, #spec_group?, #subject?
Constructor Details
#initialize(node) ⇒ Concept
Returns a new instance of Concept.
10 11 12 |
# File 'lib/rubocop/rspec/concept.rb', line 10 def initialize(node) @node = node end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
14 15 16 |
# File 'lib/rubocop/rspec/concept.rb', line 14 def eql?(other) node == other.node end |
#hash ⇒ Object
20 21 22 |
# File 'lib/rubocop/rspec/concept.rb', line 20 def hash [self.class, node].hash end |
#to_node ⇒ Object
24 25 26 |
# File 'lib/rubocop/rspec/concept.rb', line 24 def to_node node end |