@private
# File lib/aws/core/lazy_error_classes.rb, line 25 def const_missing(name) base_error_grammar = self::BASE_ERROR_GRAMMAR mod = self::ERROR_MODULE const_missing_mutex.synchronize do const_set(name, Class.new(self::Base) do include mod::ModeledError # so that MyService::Errors::Foo::Bar will work const_set(:BASE_ERROR_GRAMMAR, base_error_grammar) const_set(:ERROR_MODULE, mod) include LazyErrorClasses end) end end
# File lib/aws/core/lazy_error_classes.rb, line 41 def error_class(code) module_eval("#{self}::#{code.gsub(".","::")}") end
# File lib/aws/core/lazy_error_classes.rb, line 45 def included(mod) raise NotImplementedError.new("#{self} lazy-generates error classes; "+ "therefore it is not suitable for "+ "inclusion in other modules") end