module AwsProvisioner::DSL

Private Class Methods

translate_resource_part_name(part) click to toggle source
# File lib/aws_provisioner/dsl.rb, line 21
def self.translate_resource_part_name(part)
  if part == 'ec2'
    'EC2'
  else
    part.camelize
  end
end
translate_resource_type(resource_type) click to toggle source
# File lib/aws_provisioner/dsl.rb, line 11
def self.translate_resource_type(resource_type)
  type = resource_type
    .to_s
    .split('_')
    .map { |part| self.translate_resource_part_name(part) }
    .join('::')

  "AWS::#{type}"
end