Sha256: c112b46afe9702cbf2b0e0dbc6beaf9b813e0325b75ff25a97fd396eed827339
Contents?: true
Size: 841 Bytes
Versions: 5
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true require 'simplecov' require 'coveralls' SimpleCov.start do add_filter 'spec' end Coveralls.wear! require 'faker' require_relative '../lib/rndb' class Ball < RnDB::Table column :colour, { red: 0.3, green: 0.1, brown: 0.01, blue: 0.5, orange: 0.09 } column :transparent, { true => 0.1, false => 0.9 } column :weight, { light: 0.3, medium: 0.6, heavy: 0.1 }, lambda { |value| lookup = { light: (0.1..3.0), medium: (3.0..6.0), heavy: (6.0..9.9) } self.rand(lookup[value]) } column :material, { leather: 0.2, steel: 0.4, wood: 0.3, fluff: 0.1 } column :name, -> { Faker::Games::Pokemon.name } column :location, -> { Faker::Games::Pokemon.location } column :move, -> { Faker::Games::Pokemon.move } end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rndb-0.3.1 | spec/spec_helper.rb |
rndb-0.3.0 | spec/spec_helper.rb |
rndb-0.2.1 | spec/spec_helper.rb |
rndb-0.2.0 | spec/spec_helper.rb |
rndb-0.1.1 | spec/spec_helper.rb |