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