module Aws::Templates::Utils::Default
Default
mixin.
It implements class instance-based definitions of so-called defaults. Defaults are input hash alterations and transformations which are defined per-class basis and applied according to class hierarchy when invoked. The target mixing entity should be either Module
or Class. In the former case it's possible to model set of object which have common traits organized as an arbitrary graph with many-to-many relationship.
Public Instance Methods
Apply specified defaults to options
It's a mixin method which depends on presence of options accessor methods in the consuming class. The options property should contain an object implementing to_hash method. The method is mutating for options. The algorithm is to walk down the hierarchy of the class and collect and merge all defaults from its ancestors prioritizing the ones made later in the class hierarchy. The method is working correctly with both parent classes and all Default
mixins used in between.
# File lib/aws/templates/utils/default.rb, line 323 def defaults Instantiation.new(self.class.defaults_definition, self) end
Class-level mixins
It's a DSL extension to declaratively define defaults
# File lib/aws/templates/utils/default.rb, line 332 class_scope do ## # To mark hash branch as deleted def deleted