lib/specinfra/command/windows/base/port.rb in specinfra-2.0.0.beta15 vs lib/specinfra/command/windows/base/port.rb in specinfra-2.0.0.beta16
- old
+ new
@@ -1,15 +1,17 @@
class Specinfra::Command::Windows::Base::Port < Specinfra::Command::Windows::Base
- def check_is_listening(port, options=nil)
- Backend::PowerShell::Command.new do
- using 'is_port_listening.ps1'
- exec "IsPortListening -portNumber #{port}"
+ class << self
+ def check_is_listening(port, options=nil)
+ Backend::PowerShell::Command.new do
+ using 'is_port_listening.ps1'
+ exec "IsPortListening -portNumber #{port}"
+ end
end
- end
- def check_is_listening_with_protocol(port, protocol)
- Backend::PowerShell::Command.new do
- using 'is_port_listening.ps1'
- exec "IsPortListening -portNumber #{port} -protocol '#{protocol}'"
+ def check_is_listening_with_protocol(port, protocol)
+ Backend::PowerShell::Command.new do
+ using 'is_port_listening.ps1'
+ exec "IsPortListening -portNumber #{port} -protocol '#{protocol}'"
+ end
end
end
end