Class: Protocore::Cli
- Inherits:
-
Thor
- Object
- Thor
- Protocore::Cli
- Defined in:
- lib/protocore/cli.rb
Instance Method Summary collapse
Instance Method Details
#plan(hostname = nil) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/protocore/cli.rb', line 16 def plan(hostname=nil) require "pathname" path = Pathname.new(ENV["PWD"]).join([:config]) hosts = Protocore.load(path) hosts.select! { |host| host.name == hostname } if hostname hosts.each do |host| puts host.to_yaml + "\n" end end |