Class: Cfnlego::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/cfndsl/cfnlego/resource.rb

Overview

Resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, name) ⇒ Resource

Returns a new instance of Resource.



13
14
15
16
# File 'lib/cfndsl/cfnlego/resource.rb', line 13

def initialize(type, name)
  @type = type
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/cfndsl/cfnlego/resource.rb', line 11

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



11
12
13
# File 'lib/cfndsl/cfnlego/resource.rb', line 11

def type
  @type
end

Instance Method Details

#attributesObject



18
19
20
# File 'lib/cfndsl/cfnlego/resource.rb', line 18

def attributes
  definition['Attributes']
end

#propertiesObject



22
23
24
# File 'lib/cfndsl/cfnlego/resource.rb', line 22

def properties
  definition['Properties']
end