Class: RuboCop::Cop::RSpec::UnusedLet::Scope::Definition
- Inherits:
-
Struct
- Object
- Struct
- RuboCop::Cop::RSpec::UnusedLet::Scope::Definition
- Defined in:
- lib/rubocop/cop/rspec/unused_let/scope.rb,
lib/rubocop/cop/rspec/unused_let/scope.rb,
sig/rubocop/cop/rspec/unused_let/scope.rbs,
sig/rubocop/cop/rspec/unused_let/scope.rbs
Overview
Reopened rather than given a Struct.new block, whose body
rbs-inline does not read.
Instance Attribute Summary collapse
-
#helper ⇒ Object
Returns the value of attribute helper.
-
#name ⇒ Object
Returns the value of attribute name.
-
#names ⇒ Object
Returns the value of attribute names.
-
#node ⇒ Object
Returns the value of attribute node.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#helper ⇒ Object
Returns the value of attribute helper
21 22 23 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 21 def helper @helper end |
#name ⇒ Object
Returns the value of attribute name
21 22 23 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 21 def name @name end |
#names ⇒ Object
Returns the value of attribute names
21 22 23 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 21 def names @names end |
#node ⇒ Object
Returns the value of attribute node
21 22 23 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 21 def node @node end |
Class Method Details
.new(helper, name, names, node) ⇒ instance .new(helper:, name:, names:, node:) ⇒ instance
26 27 |
# File 'sig/rubocop/cop/rspec/unused_let/scope.rbs', line 26
def self.new: (?Symbol helper, ?Symbol? name, ?Array[Symbol] names, ?RuboCop::AST::Node node) -> instance
| (?helper: Symbol, ?name: Symbol?, ?names: Array[Symbol], ?node: RuboCop::AST::Node) -> instance
|
Instance Method Details
#anonymous? ⇒ Boolean
43 44 45 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 43 def anonymous? #: bool name.nil? end |
#bang? ⇒ Boolean
35 36 37 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 35 def bang? #: bool Matchers::BANG_HELPERS.include?(helper) end |
#def_helper? ⇒ Boolean
39 40 41 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 39 def def_helper? #: bool helper == :def end |
#subject? ⇒ Boolean
31 32 33 |
# File 'lib/rubocop/cop/rspec/unused_let/scope.rb', line 31 def subject? #: bool Matchers::SUBJECT_HELPERS.include?(helper) end |