class DrawCloud::Map
Attributes
map_by_function[RW]
name[RW]
values[RW]
Public Class Methods
new(name, map_by_function, options, values={})
click to toggle source
Calls superclass method
DrawCloud::Base::new
# File lib/draw_cloud/map.rb, line 34 def initialize(name, map_by_function, options, values={}) @name = name @map_by_function = map_by_function @values = values super(options) end
Public Instance Methods
[](key)
click to toggle source
# File lib/draw_cloud/map.rb, line 41 def [](key) MapLookup.new(self, key) end
function_resource()
click to toggle source
# File lib/draw_cloud/map.rb, line 45 def function_resource case map_by_function when :map_by_region {"Ref" => "AWS::Region"} when Parameter map_by_function.ref else raise ArgumentError, "Unknown map function #{map_by_function}" end end
load_into_config(config)
click to toggle source
Calls superclass method
DrawCloud::Base#load_into_config
# File lib/draw_cloud/map.rb, line 56 def load_into_config(config) config.cf_add_mapping resource_name, self super(config) end
to_h()
click to toggle source
# File lib/draw_cloud/map.rb, line 61 def to_h values end