Module: TestBench::Controls::Stdin::Create
- Defined in:
- lib/test_bench/controls/stdin.rb
Class Method Summary collapse
Class Method Details
.call(*paths) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/test_bench/controls/stdin.rb', line 5 def self.call(*paths) if paths.empty? paths = Path.examples end contents = <<~TEXT #{paths.join("\n")} TEXT file = File::Create.(contents:) ::File.open(file, 'r') end |
.contents ⇒ Object
19 20 21 22 23 |
# File 'lib/test_bench/controls/stdin.rb', line 19 def self.contents <<~TEXT #{Path.example} TEXT end |