Sha256: becee4cac368aa5baae7fdf6823c9cf8f2326e1507ea07b59a18b1d7d085bd99

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

require "sparkle_formation"

class SparkleFormation

  # Resources helper
  class Resources

    # Google specific resources collection
    class Google < Resources

      # Characters to be removed from supplied key on matching
      RESOURCE_TYPE_TR = "._"
      # String to split for resource namespacing
      RESOURCE_TYPE_NAMESPACE_SPLITTER = ["."]

      class << self
        include Bogo::Memoization

        # Load the builtin AWS resources
        #
        # @return [TrueClass]
        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

        # Auto load data when included
        def included(_klass)
          load!
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sparkle_formation-3.0.40 lib/sparkle_formation/resources/google.rb
sparkle_formation-3.0.38 lib/sparkle_formation/resources/google.rb
sparkle_formation-3.0.36 lib/sparkle_formation/resources/google.rb
sparkle_formation-3.0.34 lib/sparkle_formation/resources/google.rb
sparkle_formation-3.0.32 lib/sparkle_formation/resources/google.rb