class Cucumber::Cli::RerunFile
Attributes
path[R]
Public Class Methods
can_read?(path)
click to toggle source
# File lib/cucumber/cli/rerun_file.rb, line 6 def self.can_read?(path) path[0] == '@' && File.file?(real_path(path)) end
new(path)
click to toggle source
# File lib/cucumber/cli/rerun_file.rb, line 14 def initialize(path) @path = self.class.real_path(path) end
real_path(path)
click to toggle source
# File lib/cucumber/cli/rerun_file.rb, line 10 def self.real_path(path) path[1..-1] # remove leading @ end
Public Instance Methods
features()
click to toggle source
# File lib/cucumber/cli/rerun_file.rb, line 18 def features lines.map { |l| l.scan(/(?:^| |)(.*?\.feature(?:(?::\d+)*))/) }.flatten end
Private Instance Methods
lines()
click to toggle source
# File lib/cucumber/cli/rerun_file.rb, line 24 def lines IO.read(@path).split("\n") end