Method: Specinfra::Command::Windows::Base::File.check_contains
- Defined in:
- lib/specinfra/command/windows/base/file.rb
permalink .check_contains(file, pattern) ⇒ Object
[View source]
89 90 91 92 93 |
# File 'lib/specinfra/command/windows/base/file.rb', line 89 def check_contains(file, pattern) Backend::PowerShell::Command.new do exec %Q!(Get-Content("#{file}") | Out-String) -match '#{convert_regexp(pattern)}'! end end |