Skip to content

Commit

Permalink
Added method to Process type to count number of running processes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasedwards committed Dec 14, 2015
1 parent 35989d7 commit e75e087
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 e75e087

Please sign in to comment.