Class: Cucumber::Cli::RerunFile
- Inherits:
-
Object
- Object
- Cucumber::Cli::RerunFile
- Defined in:
- lib/cucumber/cli/rerun_file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #features ⇒ Object
-
#initialize(path) ⇒ RerunFile
constructor
A new instance of RerunFile.
Constructor Details
#initialize(path) ⇒ RerunFile
Returns a new instance of RerunFile.
16 17 18 |
# File 'lib/cucumber/cli/rerun_file.rb', line 16 def initialize(path) @path = self.class.real_path(path) end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/cucumber/cli/rerun_file.rb', line 6 def path @path end |
Class Method Details
.can_read?(path) ⇒ Boolean
8 9 10 |
# File 'lib/cucumber/cli/rerun_file.rb', line 8 def self.can_read?(path) path[0] == '@' && File.file?(real_path(path)) end |
.real_path(path) ⇒ Object
12 13 14 |
# File 'lib/cucumber/cli/rerun_file.rb', line 12 def self.real_path(path) path[1..] end |
Instance Method Details
#features ⇒ Object
20 21 22 |
# File 'lib/cucumber/cli/rerun_file.rb', line 20 def features lines.map { |l| l.scan(/(?:^| |)(.*?\.feature(?:(?::\d+)*))/) }.flatten end |