Class: Cfnlego::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/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.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/cfnlego/resource.rb', line 9

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'lib/cfnlego/resource.rb', line 9

def type
  @type
end

Instance Method Details

#attributesObject



16
17
18
# File 'lib/cfnlego/resource.rb', line 16

def attributes
  definition['Attributes']
end

#propertiesObject



20
21
22
# File 'lib/cfnlego/resource.rb', line 20

def properties
  definition['Properties']
end