class Aws::Templates::Render::Utils::BaseTypeViews::ToHash

Convert to hash

Converts value to hash and iteratively renders each key and value in it.

Public Instance Methods

to_rendered() click to toggle source
# File lib/aws/templates/render/utils/base_type_views.rb, line 49
def to_rendered
  _from(instance).map { |k, v| [processed_for(k), processed_for(v)] }.to_h
end

Private Instance Methods

_from(obj) click to toggle source
# File lib/aws/templates/render/utils/base_type_views.rb, line 55
def _from(obj)
  if obj.respond_to?(:to_h)
    instance.to_h
  else
    instance.to_hash
  end
end