Sha256: 4f6fc10a6825513dd15c14700237fd514e7e7d0e0ad188456dd81a298f28297e
Contents?: true
Size: 478 Bytes
Versions: 1
Compression:
Stored size: 478 Bytes
Contents
#!/usr/bin/env ruby # # A one file test to show ... require 'rubygems' gem('dm-core', '~> 0.9.7') require 'dm-core' # setup the logger DataMapper::Logger.new(STDOUT, :debug) # connect to the DB DataMapper.setup(:default, 'sqlite3::memory:') class <%= model_name %> include DataMapper::Resource # properties property :id, Serial <% attributes.each do |name, type| -%> property :<%= name.snake_case %>, <%= type.camel_case %> <% end %> end DataMapper.auto_migrate!
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
namelessjon-dm-gen-0.0.3 | lib/templates/one_file.rb |