Class: Aws::Templates::Utils::Parametrized::Nested

Inherits:
Object
  • Object
show all
Includes:
Default, Dependent, Aws::Templates::Utils::Parametrized
Defined in:
lib/aws/templates/utils/parametrized/nested.rb

Overview

Parametrized wrapper

Wraps hash or object into “parametrized” instance. Used for nested parameter definitions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Dependent

#depends_on

Methods included from Inheritable::ClassMethods

#_class_scope_defined?, #_define_class_scope, #class_scope, #included, #instance_scope

Methods included from Inspectable

#inspect, #to_s

Methods included from Guarded

#guarded_for

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



19
20
21
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 19

def options
  @options
end

#parentObject (readonly)

Returns the value of attribute parent.



56
57
58
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 56

def parent
  @parent
end

Class Method Details

.create_class(scope) ⇒ Object



25
26
27
28
29
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 25

def self.create_class(scope)
  klass = ::Class.new(self)
  klass.singleton_class.send(:define_method, :scope) { scope }
  klass
end

.getterObject



21
22
23
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 21

def self.getter
  Parametrized::Getter::AsIs.instance
end

.inspectObject



36
37
38
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 36

def self.inspect
  to_s
end

.scopeObject



40
41
42
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 40

def self.scope
  ::Object
end

.to_sObject



44
45
46
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 44

def self.to_s
  "<Nested object definition in #{scope}>"
end

.with(mod) ⇒ Object



31
32
33
34
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 31

def self.with(mod)
  include mod
  self
end

Instance Method Details

#dependenciesObject



58
59
60
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 58

def dependencies
  @dependencies ||= ::Set.new
end

#dependency?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 48

def dependency?
  true
end

#rootObject



52
53
54
# File 'lib/aws/templates/utils/parametrized/nested.rb', line 52

def root
  parent.root
end