Class: Herdsman::Command::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/herdsman/command/status.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Status

Returns a new instance of Status.



4
5
6
7
# File 'lib/herdsman/command/status.rb', line 4

def initialize(args = {})
  @herd   = args[:herd]
  @logger = args[:logger]
end

Instance Method Details

#runObject



9
10
11
12
13
14
15
16
# 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