Sha256: 8d2a40a7ac5b8cb719fc41c60460c817aedc9051c7fa4fc144caeed1cf8cd32b
Contents?: true
Size: 514 Bytes
Versions: 45
Compression:
Stored size: 514 Bytes
Contents
module Serverspec::Type class Process < Base def running? pid = @runner.get_process(@name, :format => "pid=").stdout not pid.empty? end def user get_column("user") end def group get_column("group") end def method_missing(meth) get_column(meth.to_s) end def get_column(keyword) ret = @runner.get_process(@name, :format => "#{keyword}=") val = ret.stdout.strip val = val.to_i if val.match(/^\d+$/) val end end end
Version data entries
45 entries across 45 versions & 3 rubygems