Class: Sfn::Command::Graph::Provider::Aws::AwsGraphProcessor

Inherits:
SparkleFormation::Translation
  • Object
show all
Defined in:
lib/sfn/command/graph/aws.rb

Constant Summary collapse

MAP =
{}
REF_MAPPING =
{}
FN_MAPPING =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, args = {}) ⇒ AwsGraphProcessor

Returns a new instance of AwsGraphProcessor



16
17
18
19
# File 'lib/sfn/command/graph/aws.rb', line 16

def initialize(template, args = {})
  super
  @name = args[:name]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name



14
15
16
# File 'lib/sfn/command/graph/aws.rb', line 14

def name
  @name
end

Instance Method Details

#apply_function(hash, funcs = []) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/sfn/command/graph/aws.rb', line 21

def apply_function(hash, funcs = [])
  k, v = hash.first
  if hash.size == 1
    case k
    when "Ref"
      parameters.key?(v) ? parameters[v] : hash
    when "Fn::Join"
      v.last
    when "Fn::Select"
      v.last[v.first.to_i]
    else
      hash
    end
  else
    hash
  end
end