Class: CloudFormer::CloudFormation::ConfigSetItem
- Inherits:
-
MetadataResource
- Object
- MetadataResource
- CloudFormer::CloudFormation::ConfigSetItem
- Defined in:
- lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb
Instance Attribute Summary
Attributes inherited from MetadataResource
Instance Method Summary collapse
- #commands(items = nil) ⇒ Object
- #dump_json ⇒ Object
- #files(items = nil) ⇒ Object
- #groups(items = nil) ⇒ Object
-
#initialize ⇒ ConfigSetItem
constructor
A new instance of ConfigSetItem.
- #name(val = nil) ⇒ Object
- #packages(items = nil) ⇒ Object
- #services(items = nil) ⇒ Object
- #sources(items = nil) ⇒ Object
- #users(items = nil) ⇒ Object
Methods included from MakesJson
Methods included from HasPropertiesAndAttributes
Constructor Details
#initialize ⇒ ConfigSetItem
Returns a new instance of ConfigSetItem.
7 8 9 10 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 7 def initialize super @aws_type = 'AWS::CloudFormation::ConfigSet' end |
Instance Method Details
#commands(items = nil) ⇒ Object
12 13 14 15 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 12 def commands(items=nil) @commands = items if items @commands end |
#dump_json ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 52 def dump_json res = {} %w(commands files groups packages services sources users).each do |type| vals = nil if instance_variable_defined?("@#{type}") vals = instance_variable_get("@#{type}") end if vals && vals.any? res[type] = {} vals.each do |val| res[type][val.name] = val.dump_json end end end res end |
#files(items = nil) ⇒ Object
17 18 19 20 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 17 def files(items=nil) @files = items if items @files end |
#groups(items = nil) ⇒ Object
22 23 24 25 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 22 def groups(items=nil) @groups = items if items @groups end |
#name(val = nil) ⇒ Object
47 48 49 50 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 47 def name(val=nil) @name = val if val @name end |
#packages(items = nil) ⇒ Object
27 28 29 30 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 27 def packages(items=nil) @packages = items if items @packages end |
#services(items = nil) ⇒ Object
32 33 34 35 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 32 def services(items=nil) @services = items if items @services end |
#sources(items = nil) ⇒ Object
37 38 39 40 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 37 def sources(items=nil) @sources = items if items @sources end |
#users(items = nil) ⇒ Object
42 43 44 45 |
# File 'lib/cloud_former/metadata_resources/cloud_formation/config_set_item.rb', line 42 def users(items=nil) @users = items if items @users end |