class CloudFormer::Functions::Base64

Public Class Methods

new(data) click to toggle source
# File lib/cloud_former/functions/base_64.rb, line 5
def initialize(data)
  @data = data
end

Public Instance Methods

acts_as_string?() click to toggle source
# File lib/cloud_former/functions/base_64.rb, line 13
def acts_as_string?
  true
end
dump_json() click to toggle source
# File lib/cloud_former/functions/base_64.rb, line 9
def dump_json
  { 'Fn::Base64' => transform_data(@data) }
end

Private Instance Methods

transform_data(data) click to toggle source
# File lib/cloud_former/functions/base_64.rb, line 19
def transform_data(data)
  if data.is_a?(Function)
    data.dump_json
  else
    data
  end
end