Module: Convection::DSL::IntrinsicFunctions
- Included in:
- Helpers, Model::Template
- Defined in:
- lib/convection/dsl/intrinsic_functions.rb
Overview
Formatting helpers for Intrinsic Functions
Instance Method Summary collapse
- #base64(content) ⇒ Object
- #find_in_map(map_name, key_1, key_2) ⇒ Object
- #fn_and(*conditions) ⇒ Object
- #fn_equals(value_1, value_2) ⇒ Object
- #fn_if(condition, value_true, value_false) ⇒ Object
- #fn_not(condition) ⇒ Object
- #fn_or(*conditions) ⇒ Object
- #fn_ref(resource) ⇒ Object
- #get_att(resource, attr_name) ⇒ Object
- #get_azs(region) ⇒ Object
- #join(delimiter, *values) ⇒ Object
- #select(index, *objects) ⇒ Object
Instance Method Details
#base64(content) ⇒ Object
6 7 8 9 10 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 6 def base64(content) { 'Fn::Base64' => content } end |
#find_in_map(map_name, key_1, key_2) ⇒ Object
42 43 44 45 46 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 42 def find_in_map(map_name, key_1, key_2) { 'Fn::FindInMap' => [map_name, key_1, key_2] } end |
#fn_and(*conditions) ⇒ Object
12 13 14 15 16 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 12 def fn_and(*conditions) { 'Fn::And' => conditions } end |
#fn_equals(value_1, value_2) ⇒ Object
18 19 20 21 22 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 18 def fn_equals(value_1, value_2) { 'Fn::Equals' => [value_1, value_2] } end |
#fn_if(condition, value_true, value_false) ⇒ Object
24 25 26 27 28 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 24 def fn_if(condition, value_true, value_false) { 'Fn::If' => [condition, value_true, value_false] } end |
#fn_not(condition) ⇒ Object
30 31 32 33 34 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 30 def fn_not(condition) { 'Fn::Not' => [condition] } end |
#fn_or(*conditions) ⇒ Object
36 37 38 39 40 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 36 def fn_or(*conditions) { 'Fn::Or' => conditions } end |
#fn_ref(resource) ⇒ Object
72 73 74 75 76 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 72 def fn_ref(resource) { 'Ref' => resource } end |
#get_att(resource, attr_name) ⇒ Object
48 49 50 51 52 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 48 def get_att(resource, attr_name) { 'Fn::GetAtt' => [resource, attr_name] } end |
#get_azs(region) ⇒ Object
54 55 56 57 58 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 54 def get_azs(region) { 'Fn::GetAZs' => region } end |
#join(delimiter, *values) ⇒ Object
60 61 62 63 64 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 60 def join(delimiter, *values) { 'Fn::Join' => [delimiter, values] } end |
#select(index, *objects) ⇒ Object
66 67 68 69 70 |
# File 'lib/convection/dsl/intrinsic_functions.rb', line 66 def select(index, *objects) { 'Fn::Select' => [index, objects] } end |