Class: TestBench::Run::Substitute::Run
- Inherits:
-
Object
- Object
- TestBench::Run::Substitute::Run
- Defined in:
- lib/test_bench/run/substitute.rb
Instance Attribute Summary collapse
-
#ran ⇒ Object
Returns the value of attribute ran.
Instance Method Summary collapse
Instance Attribute Details
#ran ⇒ Object
Returns the value of attribute ran.
9 10 11 |
# File 'lib/test_bench/run/substitute.rb', line 9 def ran @ran end |
Instance Method Details
#call(&block) ⇒ Object
15 16 17 18 19 |
# File 'lib/test_bench/run/substitute.rb', line 15 def call(&block) self.ran = true block.(self) unless block.nil? end |
#path(path) ⇒ Object Also known as: <<
21 22 23 |
# File 'lib/test_bench/run/substitute.rb', line 21 def path(path) paths << path end |
#paths ⇒ Object
11 12 13 |
# File 'lib/test_bench/run/substitute.rb', line 11 def paths @paths ||= [] end |
#ran?(*paths) ⇒ Boolean
26 27 28 29 30 31 32 |
# File 'lib/test_bench/run/substitute.rb', line 26 def ran?(*paths) return false unless ran paths.all? do |path| self.paths.include?(path) end end |