lib/guard/cucumber/focuser.rb
def focus(paths, focus_tag)
          return false if paths.empty?

          paths.inject([]) do |updated_paths, path|
            focused_line_numbers = scan_path_for_focus_tag(path, focus_tag)

            if focused_line_numbers.empty?
              updated_paths << path
            else
              updated_paths << append_line_numbers_to_path(
                focused_line_numbers, path
              )
            end

            updated_paths
          end
        end
# Focus the supplied paths using the provided focus tag.
#
# @param [Array<String>] paths the locations of the feature files
# @param [String] focus_tag the focus tag to look for in each path
# @return [Array<String>] the updated paths
#
Focus the supplied paths using the provided focus tag.
Focus the supplied paths using the provided focus tag .
def focus(paths, focus_tag)
          return false if paths.empty?
          paths.inject([]) do |updated_paths, path|
            focused_line_numbers = scan_path_for_focus_tag(path, focus_tag)
            if focused_line_numbers.empty?
              updated_paths << path
            else
              updated_paths << append_line_numbers_to_path(
                focused_line_numbers, path
              )
            end
            updated_paths
          end
        end
def focus ( paths , focus_tag ) return false if paths . empty? paths . inject ( [ ] ) do | updated_paths , path | focused_line_numbers = scan_path_for_focus_tag ( path , focus_tag ) if focused_line_numbers . empty? updated_paths << path else updated_paths << append_line_numbers_to_path ( focused_line_numbers , path ) end updated_paths end end
Focus the supplied paths using the provided focus tag.
Focus the supplied paths using the provided focus tag .
the updated paths
the updated paths
Array<String>
paths
focus_tag
focus_tag the focus tag to look for in each path
focus_tag the focus tag to look for in each path