Class: SparkleFormation::SparkleStruct::Heat

Inherits:
SparkleFormation::SparkleStruct show all
Includes:
SparkleFormation::SparkleAttribute, SparkleFormation::SparkleAttribute::Heat
Defined in:
lib/sparkle_formation/sparkle_struct.rb

Overview

Heat specific struct

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from SparkleFormation::SparkleStruct

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SparkleFormation::SparkleStruct

Instance Method Details

#__attribute_key(key) ⇒ String Originally defined in module SparkleFormation::SparkleAttribute

Format the provided key. If symbol type is provided formatting is forced. Otherwise the default formatting is applied

Parameters:

  • key (String, Symbol)

    given key

Returns:

  • (String)

    formatted key

#_depends_on(resource_name) ⇒ Array<String> #_depends_on(resource_names) ⇒ Array<String> #_depends_on(*resource_names) ⇒ Array<String> Also known as: depends_on! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Note:

this will directly modify the struct at its current context to inject depends on structure

Resource dependency generator

Overloads:

  • #_depends_on(resource_name) ⇒ Array<String>

    Parameters:

    • resource_name (String, Symbol)

      logical resource name

  • #_depends_on(resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

  • #_depends_on(*resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

Returns:

  • (Array<String>)

#_digest(value, algorithm = "sha512") ⇒ Object Also known as: digest! Originally defined in module SparkleFormation::SparkleAttribute::Heat

digest generator

Parameters:

  • value (String, Hash)

    thing to be hashed

  • algorithm (String) (defaults to: "sha512")

    algorithm to use (defaults to 'sha512')

#_dynamic(resource_type, custom_name, options = {}) ⇒ self #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self Also known as: dynamic! Originally defined in module SparkleFormation::SparkleAttribute

Overloads:

  • #_dynamic(resource_type, custom_name, options = {}) ⇒ self
    Note:

    All other options are set into the new resource's properties

    Insert builtin resource

    Parameters:

    • resource_type (String, Symbol)

      provider resource type

    • custom_name (String, Symbol)

      custom name used for resource name generation

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :resource_name_suffix (String, NilClass)

      custom suffix to use for name generation (defaults to resource_type)

  • #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self
    Note:

    All options are passed to dynamic with custom_name

    Call custom dynamic from available sparkle packs

    Parameters:

    • dynamic_name (Symbol)

      name of registered dynamic

    • custom_name (Symbol, String)

      unique name passed directly to registered dynamic

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :provider (String, Symbol)

      override provider restriction when fetching dynamic

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_get_attr(logical_id, attribute_name) ⇒ Hash Also known as: _attr, attr! Originally defined in module SparkleFormation::SparkleAttribute::Heat

get_attr generator

Parameters:

  • logical_id (String, Symbol)

    logical resource name

  • attribute_name (String, Symbol)

    name of desired resource attribute

Returns:

  • (Hash)

#_get_file(loc) ⇒ Hash Also known as: _file, file! Originally defined in module SparkleFormation::SparkleAttribute::Heat

get_file generator

Parameters:

  • loc (String)

Returns:

  • (Hash)

#_get_param(name) ⇒ Hash #_get_param(name, index1, index2, ...) ⇒ Hash Also known as: _param, param! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Overloads:

  • #_get_param(name) ⇒ Hash

    get_param generator

    Parameters:

    • name (String, Symbol)

      name of parameter

  • #_get_param(name, index1, index2, ...) ⇒ Hash

    get_param generator accessing complex data

    Parameters:

    • name (String, Symbol)

      name of parameter

    • index1 (Object)

      value for key/index

    • index2 (Object)

      value for key/index

Returns:

  • (Hash)

#_get_resource(r_name) ⇒ Hash Also known as: _resource, resource! Originally defined in module SparkleFormation::SparkleAttribute::Heat

get_resource generator

Parameters:

  • r_name (String, Symbol)

Returns:

  • (Hash)

#_list_join(*args, opts = {}) ⇒ Hash Also known as: _join, join! Originally defined in module SparkleFormation::SparkleAttribute::Heat

list_join generator

Parameters:

  • args (String, Hash)

    list of items to join

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :options (Hash)

    options for join function

Returns:

  • (Hash)

#_map_merge(hash1, hash2, ...) ⇒ Hash Also known as: map_merge! Originally defined in module SparkleFormation::SparkleAttribute::Heat

map_merge generator

Parameters:

  • hash1 (Hash)

    item to merge

  • hash2 (Hash)

    item to merge

Returns:

  • (Hash)

#_method(sym) ⇒ Method Also known as: method! Originally defined in module SparkleFormation::SparkleAttribute

Note:

usually used as puts! method!(:foo).source_location

Lookup a method definition on self

Parameters:

  • sym (Symbol)

    name of method

Returns:

  • (Method)

See Also:

  • Object#method

#_nest(template, *names, options = {}) ⇒ self Also known as: nest! Originally defined in module SparkleFormation::SparkleAttribute

Nest a stack resource

Parameters:

  • template (String, Symbol)

    name of desired template

  • names (String, Symbol)

    list of optional string/symbol values for resource name generation

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :provider (String, Symbol)

    override provider restriction when fetching template

  • :overwrite_name (Truthy, Falsey)

    when set to true, will not include template name in resource name

  • :parameters (Hash)

    compile time parameter values to pass to nested template

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_project_idHash Also known as: project_id! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Returns:

  • (Hash)

#_puts(obj, ...) ⇒ NilClass Also known as: puts! Originally defined in module SparkleFormation::SparkleAttribute

Print to stdout

Parameters:

  • obj (Object)

    object to print

Returns:

  • (NilClass)

See Also:

  • Kernel.puts

#_raise(*args) ⇒ Object Also known as: raise! Originally defined in module SparkleFormation::SparkleAttribute

Raise an exception

See Also:

  • Kernel.raise

#_registry(name) ⇒ Object #_registry(name, *args, options = {}) ⇒ Object Also known as: registry! Originally defined in module SparkleFormation::SparkleAttribute

Return value of registry item

Overloads:

  • #_registry(name) ⇒ Object

    Return value from registry item with given name

    Parameters:

    • name (String, Symbol)

      registry item name

  • #_registry(name, *args, options = {}) ⇒ Object
    Note:

    args and options will be passed directly to registry item when called

    Pass given parameters to registry item with given name and return the value

    Parameters:

    • name (String, Symbol)

      registry item name

    • options (Hash) (defaults to: {})
    • options (Hash) (defaults to: {})

      :provider override provider restriction when fetching registry item

    • args (Object)

      argument list

Returns:

  • (Object)

    return value of registry item

#_resource_facade(type) ⇒ Hash Also known as: _facade, facade!, resource_facade! Originally defined in module SparkleFormation::SparkleAttribute::Heat

resource_facade generator

Parameters:

  • type (String, Symbol)

Returns:

  • (Hash)

#_resource_nameString Also known as: resource_name! Originally defined in module SparkleFormation::SparkleAttribute

Return current resource name

Returns:

  • (String)

#_stack_idHash Also known as: stack_id! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Returns:

  • (Hash)

#_stack_nameHash Also known as: stack_name! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Returns:

  • (Hash)

#_stack_output(stack_name, output_name) ⇒ Hash Also known as: stack_output! Originally defined in module SparkleFormation::SparkleAttribute::Heat

Reference output value from nested stack

Parameters:

  • stack_name (String, Symbol)

    logical resource name of stack

  • output_name (String, Symbol)

    stack output name

Returns:

  • (Hash)

#_str_replace(template, params) ⇒ Hash Also known as: _replace, replace! Originally defined in module SparkleFormation::SparkleAttribute::Heat

str_replace generator

Parameters:

  • template (String)
  • params (Hash)

Returns:

  • (Hash)

#_str_split(splitter, string, idx = nil) ⇒ Hash Also known as: _split, split! Originally defined in module SparkleFormation::SparkleAttribute::Heat

str_split generator

Parameters:

  • splitter (String)
  • string (Object)
  • idx (Numeric) (defaults to: nil)

Returns:

  • (Hash)

#_system(command) ⇒ String Also known as: system! Originally defined in module SparkleFormation::SparkleAttribute

Execute system command

Parameters:

  • command (String)

Returns:

  • (String)

    result