Method: RSpec::Core::World#preceding_declaration_line
- Defined in:
- lib/rspec/core/world.rb
#preceding_declaration_line(absolute_file_name, filter_line) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Find line number of previous declaration.
140 141 142 143 144 145 146 |
# File 'lib/rspec/core/world.rb', line 140 def preceding_declaration_line(absolute_file_name, filter_line) line_numbers = descending_declaration_line_numbers_by_file.fetch(absolute_file_name) do return nil end line_numbers.find { |num| num <= filter_line } end |