Class: RSpec::Expectations::BlockSnippetExtractor::BlockTokenExtractor

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

Performs extraction of block body snippet using tokens, which cannot be done with node information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Constructor Details

#initializeBlockTokenExtractor

Returns a new instance of BlockTokenExtractor.



78
79
80
81
# 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 78

def initialize(*)
  super
  parse!
end

Instance Attribute Details

#body_tokensObject (readonly)

Returns the value of attribute body_tokens.



76
77
78
# 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 76

def body_tokens
  @body_tokens
end

#stateObject (readonly)

Returns the value of attribute state.



76
77
78
# 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 76

def state
  @state
end