Module: Cloudfront::Utils::ConfigurationChecker

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#error_messagesObject (readonly)

Returns the value of attribute error_messages.



4
5
6
# File 'lib/cloudfront/utils/configuration_checker.rb', line 4

def error_messages
  @error_messages
end

Instance Method Details

#check_configurationObject



12
13
14
15
16
# File 'lib/cloudfront/utils/configuration_checker.rb', line 12

def check_configuration
  unless valid?
    raise Cloudfront::Exceptions::DistributionConfigurationException.new "Configuration error : \n #{@error_messages.join "\n"}"
  end
end

#valid?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
# File 'lib/cloudfront/utils/configuration_checker.rb', line 6

def valid?
  (@error_messages ||= []).clear
  validate
  !@error_messages.any?
end