lib/cli/mastermind.rb
# Prints the configuration object built from the loaded masterplan files.
#
# @return [Void]
Prints the configuration object built from the loaded masterplan files.
Prints the configuration object built from the loaded masterplan files .
def do_print_configuration
        frame('Configuration') do
          fade_code = CLI::UI::Color.new(90, '').code
          puts stylize("{{?}} #{fade_code}Values starting with {{*}} #{fade_code}were lazy loaded.#{CLI::UI::Color::RESET.code}")
          print "\n"
          configuration.instance_variables.each do |attribute|
            value = configuration.instance_variable_get(attribute)
            name = attribute.to_s.sub(/^@/, '')
            if value.respond_to? :call
              if @arguments.resolve_callable_attributes?
                value = begin
                          configuration.send(name)
                        rescue => e
                          "UNABLE TO LOAD: #{e.message}"
                        end
              end
              was_callable = true
            else
              was_callable = false
            end
            suffix = was_callable ? '{{*}}' : ' '
            puts stylize("{{yellow:#{name}}}")
            puts stylize("\t #{suffix} {{blue:#{value.inspect}}}")
            print "\n"
          end
        end
      end
def do_print_configuration frame ( 'Configuration' ) do fade_code = CLI :: UI :: Color . new ( 90 , '' ) . code puts stylize ( "{{?}} #{fade_code}Values starting with {{*}} #{fade_code}were lazy loaded.#{CLI::UI::Color::RESET.code}" ) print "\n" configuration . instance_variables . each do | attribute | value = configuration . instance_variable_get ( attribute ) name = attribute . to_s . sub ( / ^@ / , '' ) if value . respond_to? :call if @arguments . resolve_callable_attributes? value = begin configuration . send ( name ) rescue => e "UNABLE TO LOAD: #{e.message}" end end was_callable = true else was_callable = false end suffix = was_callable ? '{{*}}' : ' ' puts stylize ( "{{yellow:#{name}}}" ) puts stylize ( "\t #{suffix} {{blue:#{value.inspect}}}" ) print "\n" end end end
Prints the configuration object built from the loaded masterplan files.
Prints the configuration object built from the loaded masterplan files .
None
Void