module DrawCloud::Utilities
Public Instance Methods
desplice(string)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 45 def desplice(string) fnjoin("", *string.split('|CHOPHERE|').collect {|s| if s.start_with? 'YYYY' then YAML::load(s[4,s.length-4]) else s end }) end
fnbase64(arg)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 33 def fnbase64(arg) Base64Func.new(arg) end
fngetatt(resource, attribute_name)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 29 def fngetatt(resource, attribute_name) GetAttFunc.new(resource, attribute_name) end
fnjoin(delimiter, *args)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 37 def fnjoin(delimiter, *args) JoinFunc.new(delimiter, args) end
hash_to_tag_array(hash)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 61 def hash_to_tag_array(hash) hash.collect {|(k,v)| {"Key" => k, "Value" => v} } end
region()
click to toggle source
# File lib/draw_cloud/utilities.rb, line 21 def region SimpleRef.new("AWS::Region") end
resource_style(str)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 41 def resource_style(str) DrawCloud.resource_style(str) end
splice(string)
click to toggle source
# File lib/draw_cloud/utilities.rb, line 49 def splice(string) out = '|CHOPHERE|' outref = DrawCloud.ref(string) case outref when String out += outref else out += 'YYYY' + YAML::dump(outref) end out += '|CHOPHERE|' end
stack_name()
click to toggle source
# File lib/draw_cloud/utilities.rb, line 25 def stack_name SimpleRef.new("AWS::StackName") end