Skip to content

Commit

Permalink
Merge pull request #545 from tobiasedwards/process-count
Browse files Browse the repository at this point in the history
Added method to Process type to count number of running processes
  • Loading branch information
mizzy committed Dec 15, 2015
2 parents 35989d7 + e75e087 commit c7d09a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/serverspec/type/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ def group
get_column("group")
end

def count
@runner.count_process(@name).stdout.strip.to_i
end

def method_missing(meth)
get_column(meth.to_s)
end
Expand Down

0 comments on commit c7d09a3

Please sign in to comment.