Class: Guignol::Commands::DNS

Inherits:
Base
  • Object
show all
Defined in:
lib/guignol/commands/dns.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #run

Constructor Details

This class inherits a constructor from Guignol::Commands::Base

Instance Method Details

#before_run(configs, options = {}) ⇒ Object



23
24
25
# File 'lib/guignol/commands/dns.rb', line 23

def before_run(configs, options = {})
  @max_width = configs.keys.map(&:size).max
end

#run_on_server(instance, options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/guignol/commands/dns.rb', line 16

def run_on_server(instance, options = {})
  synchronize do
    shell.say instance.name.ljust(@max_width + 1)
    shell.say instance.dns_name
  end
end