Class: RuboCop::RSpec::Concept
- Inherits:
-
Object
- Object
- RuboCop::RSpec::Concept
- Extended by:
- NodePattern::Macros, Language::NodePattern
- 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::NodePattern
block_or_numblock_pattern, block_pattern, numblock_pattern, send_pattern
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.
11 12 13 |
# File 'lib/rubocop/rspec/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/rspec/concept.rb', line 15 def eql?(other) node == other.node end |
#hash ⇒ Object
21 22 23 |
# File 'lib/rubocop/rspec/concept.rb', line 21 def hash [self.class, node].hash end |
#to_node ⇒ Object
25 26 27 |
# File 'lib/rubocop/rspec/concept.rb', line 25 def to_node node end |