Class: RuboCop::Cop::RSpec::UnusedLet::SharedExampleRegistry::Definition

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb,
sig/rubocop/cop/rspec/unused_let/shared_example_registry.rbs

Overview

One shared block's region data, gathered across its whole subtree.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#defsObject

Returns the value of attribute defs

Returns:

  • (Object)

    the current value of defs



26
27
28
# File 'lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb', line 26

def defs
  @defs
end

#inclusionsObject

Returns the value of attribute inclusions

Returns:

  • (Object)

    the current value of inclusions



26
27
28
# File 'lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb', line 26

def inclusions
  @inclusions
end

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



26
27
28
# File 'lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb', line 26

def node
  @node
end

#ownerObject

Returns the value of attribute owner

Returns:

  • (Object)

    the current value of owner



26
27
28
# File 'lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb', line 26

def owner
  @owner
end

#refsObject

Returns the value of attribute refs

Returns:

  • (Object)

    the current value of refs



26
27
28
# File 'lib/rubocop/cop/rspec/unused_let/shared_example_registry.rb', line 26

def refs
  @refs
end

Class Method Details

.new(owner, node, refs, defs, inclusions) ⇒ instance .new(owner:, node:, refs:, defs:, inclusions:) ⇒ instance

Overloads:

  • .new(owner, node, refs, defs, inclusions) ⇒ instance

    Parameters:

    • owner (RuboCop::AST::Node, nil)
    • node (RuboCop::AST::Node)
    • refs (Set[Symbol])
    • defs (Set[Symbol])
    • inclusions (Array[[ String?, RuboCop::AST::Node ]])

    Returns:

    • (instance)
  • .new(owner:, node:, refs:, defs:, inclusions:) ⇒ instance

    Parameters:

    • owner: (RuboCop::AST::Node, nil)
    • node: (RuboCop::AST::Node)
    • refs: (Set[Symbol])
    • defs: (Set[Symbol])
    • inclusions: (Array[[ String?, RuboCop::AST::Node ]])

    Returns:

    • (instance)


34
35
# File 'sig/rubocop/cop/rspec/unused_let/shared_example_registry.rbs', line 34

def self.new: (?RuboCop::AST::Node? owner, ?RuboCop::AST::Node node, ?Set[Symbol] refs, ?Set[Symbol] defs, ?Array[[ String?, RuboCop::AST::Node ]] inclusions) -> instance
| (?owner: RuboCop::AST::Node?, ?node: RuboCop::AST::Node, ?refs: Set[Symbol], ?defs: Set[Symbol], ?inclusions: Array[[ String?, RuboCop::AST::Node ]]) -> instance