Class: RSpec::Expectations::BlockSnippetExtractor::BlockLocator

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/block_snippet_extractor.rb

Overview

Locates target block with node information (semantics), which tokens don’t have.

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Instance Method Details

#body_content_locationsObject



203
204
205
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/block_snippet_extractor.rb', line 203

def body_content_locations
  @body_content_locations ||= block_body_node.map(&:location).compact
end

#method_call_locationObject



199
200
201
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-expectations-3.12.2/lib/rspec/expectations/block_snippet_extractor.rb', line 199

def method_call_location
  @method_call_location ||= method_ident_node.location
end