Method: Awspec::Generator::Template.generate_type

Defined in:
lib/awspec/generator/template.rb

.generate_typeObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/awspec/generator/template.rb', line 25

def self.generate_type
  path = 'lib/awspec/type/' + @type.underscore + '.rb'
  base = @account_attribute ? 'AccountAttributeBase' : 'ResourceBase'
  content = "module Awspec::Type\n  class \#{@type.camelize} < \#{base}\ndef resource_via_client\n  @resource_via_client ||= # FIXME\nend\n\ndef id\n @id ||= # FIXME\nend\n  end\nend\n"
  self.file_check_and_puts(path, content)
end