Module: DrawCloud::Utilities
- Included in:
- Base
- Defined in:
- lib/draw_cloud/utilities.rb
Instance Method Summary collapse
- #desplice(string) ⇒ Object
- #fnbase64(arg) ⇒ Object
- #fngetatt(resource, attribute_name) ⇒ Object
- #fnjoin(delimiter, *args) ⇒ Object
- #hash_to_tag_array(hash) ⇒ Object
- #region ⇒ Object
- #resource_style(str) ⇒ Object
- #splice(string) ⇒ Object
- #stack_name ⇒ Object
Instance Method Details
#desplice(string) ⇒ Object
45 46 47 |
# 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) ⇒ Object
33 34 35 |
# File 'lib/draw_cloud/utilities.rb', line 33 def fnbase64(arg) Base64Func.new(arg) end |
#fngetatt(resource, attribute_name) ⇒ Object
29 30 31 |
# File 'lib/draw_cloud/utilities.rb', line 29 def fngetatt(resource, attribute_name) GetAttFunc.new(resource, attribute_name) end |
#fnjoin(delimiter, *args) ⇒ Object
37 38 39 |
# File 'lib/draw_cloud/utilities.rb', line 37 def fnjoin(delimiter, *args) JoinFunc.new(delimiter, args) end |
#hash_to_tag_array(hash) ⇒ Object
61 62 63 |
# File 'lib/draw_cloud/utilities.rb', line 61 def hash_to_tag_array(hash) hash.collect {|(k,v)| {"Key" => k, "Value" => v} } end |
#region ⇒ Object
21 22 23 |
# File 'lib/draw_cloud/utilities.rb', line 21 def region SimpleRef.new("AWS::Region") end |
#resource_style(str) ⇒ Object
41 42 43 |
# File 'lib/draw_cloud/utilities.rb', line 41 def resource_style(str) DrawCloud.resource_style(str) end |