Sha256: 19007d99d39117d84bc057a7a02ad4da09dd1c7b70e0a2279254eb46ec880801

Contents?: true

Size: 468 Bytes

Versions: 2

Compression:

Stored size: 468 Bytes

Contents

module Awspec
  module Helper
    module Type
      types = %w(
        base ec2 rds rds_db_parameter_group security_group
        vpc s3 route53_hosted_zone auto_scaling_group subnet
        route_table
      )

      types.each { |type| require "awspec/type/#{type}" }

      types.each do |type|
        define_method type do |*args|
          name = args.first
          eval "Awspec::Type::#{type.to_camel_case}.new(name)"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
awspec-0.4.1 lib/awspec/helper/type.rb
awspec-0.4.0 lib/awspec/helper/type.rb