class Herdsman::Command::Status

Attributes

herd[R]
logger[R]

Public Class Methods

new(args = {}) click to toggle source
# File lib/herdsman/command/status.rb, line 4
def initialize(args = {})
  @herd   = args[:herd]
  @logger = args[:logger]
end

Public Instance Methods

run() click to toggle source
# File lib/herdsman/command/status.rb, line 9
def run
  herd.members.each do |herd_member|
    herd_member.status_report.each do |message|
      logger.send(message.level, message.msg)
    end
  end
  herd.gathered?
end