class CloudFormer::Functions::Equals
Public Class Methods
new(value1, value2)
click to toggle source
# File lib/cloud_former/functions/equals.rb, line 5 def initialize(value1, value2) @value1 = value1 @value2 = value2 end
Public Instance Methods
dump_json()
click to toggle source
# File lib/cloud_former/functions/equals.rb, line 10 def dump_json if @value1.respond_to?(:get_name) val1 = { 'Ref' => @value1.get_name } elsif @value1.respond_to?(:to_s) val1 = @value1.to_s end if @value2.respond_to?(:get_name) val2 = { 'Ref' => @value2.get_name } elsif @value2.respond_to?(:to_s) val2 = @value2.to_s end { 'Fn::Equals' => [val1, val2] } end