class TerraformLandscape::CLI
Command line application interface.
def define_commands
def define_commands command :print do |c| c.action do print end end global_option '--no-color', 'Do not output any color' do String.disable_colorization = true @output.color_enabled = false end default_command :print end
def initialize(output)
def initialize(output) @output = output end
def print
def print printer = Printer.new(@output) printer.process_stream(STDIN) end
def run(args)
-
(Integer)
- exit status code
Parameters:
-
args
(Array
) -- command line arguments
def run(args) program :name, 'Terraform Landscape' program :version, VERSION program :description, 'Pretty-print your Terraform plan output' define_commands run! 0 # OK end