Sha256: cba7f555ca904e003b8aadbe1ffdc1c925e711741d6747beb1f1ca728e37af0e
Contents?: true
Size: 589 Bytes
Versions: 2
Compression:
Stored size: 589 Bytes
Contents
require 'faker' require 'facemock/database/table' require 'facemock/user' module Facemock class Application < Database::Table TABLE_NAME = :applications COLUMN_NAMES = [:id, :secret, :created_at] CHILDREN = [ User ] # WANT : DBに登録済みの値と重複しないようにする(id, secret) def initialize(options={}) opts = Hashie::Mash.new(options) @id = ( opts.id.to_i > 0 ) ? opts.id.to_i : Faker::Number.number(15).to_i @secret = opts.secret || Faker::Lorem.characters(32) @created_at = opts.created_at end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facemock-0.0.11 | lib/facemock/application.rb |
facemock-0.0.10 | lib/facemock/application.rb |