Class: SparkleFormation::Resources::Google

Inherits:
SparkleFormation::Resources show all
Extended by:
Bogo::Memoization
Defined in:
lib/sparkle_formation/resources/google.rb

Overview

Google specific resources collection

Constant Summary collapse

RESOURCE_TYPE_TR =

Characters to be removed from supplied key on matching

"._"
RESOURCE_TYPE_NAMESPACE_SPLITTER =

String to split for resource namespacing

["."]

Class Method Summary collapse

Class Method Details

.included(_klass) ⇒ Object

Auto load data when included



40
41
42
# File 'lib/sparkle_formation/resources/google.rb', line 40

def included(_klass)
  load!
end

.load!TrueClass

Load the builtin AWS resources

Returns:

  • (TrueClass)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/sparkle_formation/resources/google.rb', line 22

def load!
  memoize(:google_resources, :global) do
    load(
      File.join(
        File.dirname(__FILE__),
        "google_resources.json"
      )
    )
    # NOTE: Internal resource type used for nesting
    registry["sparkleformation.stack"] = {
      "properties" => [],
      "full_properties" => {},
    }
    true
  end
end