class Cfnlego::Resource

Resource

Attributes

name[R]
type[R]

Public Class Methods

new(type, name) click to toggle source
# File lib/cfndsl/cfnlego/resource.rb, line 13
def initialize(type, name)
  @type = type
  @name = name
end

Public Instance Methods

attributes() click to toggle source
# File lib/cfndsl/cfnlego/resource.rb, line 18
def attributes
  definition['Attributes']
end
properties() click to toggle source
# File lib/cfndsl/cfnlego/resource.rb, line 22
def properties
  definition['Properties']
end

Private Instance Methods

definition() click to toggle source
# File lib/cfndsl/cfnlego/resource.rb, line 28
def definition
  @definition ||= Cfnlego.resources[@type]
rescue StandardError
  raise "unknown #{@type}, no matching definition found"
end