Class: DrawCloud::Output

Inherits:
Base
  • Object
show all
Defined in:
lib/draw_cloud/output.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#as_groups, #as_launch_configurations, #deletion_policy, #depends_on, #ec2_instances, #elastic_ips, #gateways, #iam_access_keys, #iam_policies, #iam_users, #mappings, #metadata, #network_acls, #network_interfaces, #outputs, #parameters, #parent, #rdses, #resources, #route_tables, #security_groups, #sns_topics, #subnets, #vpcs, #wait_handles

Instance Method Summary collapse

Methods inherited from Base

#[], #accessor, #add_standard_properties, #create_as_group, #create_as_launch_configuration, #create_ec2_instance, #create_ec2_instance_template, #create_elastic_ip, #create_iam_access_key, #create_iam_policy, #create_iam_user, #create_mapping, #create_network_acl, #create_network_interface, #create_output, #create_parameter, #create_rds, #create_route_table, #create_security_group, #create_service, #create_sns_topic, #create_subnet, #create_vpc, #create_wait_handle, #ref, #resource_name

Methods included from Locations

#arn_s3

Methods included from Utilities

#desplice, #fnbase64, #fngetatt, #fnjoin, #hash_to_tag_array, #region, #resource_style, #splice, #stack_name

Constructor Details

#initialize(name, options = {}, &block) ⇒ Output

Returns a new instance of Output.



22
23
24
25
# File 'lib/draw_cloud/output.rb', line 22

def initialize(name, options={}, &block)
  @name = name
  super(options, &block)
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



21
22
23
# File 'lib/draw_cloud/output.rb', line 21

def description
  @description
end

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/draw_cloud/output.rb', line 21

def name
  @name
end

#valueObject

Returns the value of attribute value.



21
22
23
# File 'lib/draw_cloud/output.rb', line 21

def value
  @value
end

Instance Method Details

#load_into_config(config) ⇒ Object



27
28
29
30
# File 'lib/draw_cloud/output.rb', line 27

def load_into_config(config)
  config.cf_add_output resource_name, self
  super(config)
end

#to_hObject



32
33
34
35
36
# File 'lib/draw_cloud/output.rb', line 32

def to_h
  h = {"Value" => DrawCloud.ref(value)}
  h["Description"] = description if description
  h
end