Sitepoint demo app for learning to use Sinatra
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

12 lines
425 B

  1. %w[sinatra dm-core dm-migrations slim sass].each{ |lib| require lib }
  2. DataMapper.setup(:default, File.join("sqlite3://",settings.root,"development.db"))
  3. class Robot
  4. include DataMapper::Resource
  5. property :id, Serial
  6. property :top, Integer, default: proc { |m,p| 1+rand(6) }
  7. property :mid, Integer, default: proc { |m,p| 1+rand(4) }
  8. property :bot, Integer, default: proc { |m,p| 1+rand(5) }
  9. end
  10. DataMapper.finalize