Class: EtnaApp::Config::Show

Inherits:
Etna::Command show all
Defined in:
lib/commands.rb

Instance Attribute Summary

Attributes inherited from Etna::Command

#parent

Instance Method Summary collapse

Methods inherited from Etna::Command

#completions, #fill_in_missing_params, #find_command, #initialize, parent_scope, #setup

Methods included from Etna::CommandOrExecutor

#command_name, #completions_for, #desc, #flag_argspec, #flag_as_parameter, included, #parse_flags, #program_name, #usage

Constructor Details

This class inherits a constructor from Etna::Command

Instance Method Details

#executeObject



41
42
43
44
45
46
47
48
# File 'lib/commands.rb', line 41

def execute
  if EtnaApp.instance.environment == :many
    File.open(EtnaApp.config_file_path, 'r') { |f| puts f.read }
  else
    puts "Current environment: #{EtnaApp.instance.environment}"
    pp EtnaApp.instance.env_config
  end
end