module Mockumentary::Data
Public Class Methods
binary()
click to toggle source
# File lib/mockumentary/data.rb, line 43 def self.binary Faker::Lorem.characters end
boolean()
click to toggle source
# File lib/mockumentary/data.rb, line 47 def self.boolean false end
date()
click to toggle source
# File lib/mockumentary/data.rb, line 39 def self.date Date.today + rand(60) * (3600*24) end
datetime()
click to toggle source
# File lib/mockumentary/data.rb, line 35 def self.datetime time end
decimal()
click to toggle source
# File lib/mockumentary/data.rb, line 19 def self.decimal rand * 100 end
first_name()
click to toggle source
# File lib/mockumentary/data.rb, line 51 def self.first_name Faker::Name.first_name end
float()
click to toggle source
# File lib/mockumentary/data.rb, line 23 def self.float decimal end
full_name()
click to toggle source
# File lib/mockumentary/data.rb, line 59 def self.full_name "#{first_name} #{last_name}" end
generate(key)
click to toggle source
# File lib/mockumentary/data.rb, line 3 def self.generate(key) self.send(key) if key.is_a?(Symbol) && respond_to?(key) end
integer()
click to toggle source
# File lib/mockumentary/data.rb, line 15 def self.integer rand(100) end
last_name()
click to toggle source
# File lib/mockumentary/data.rb, line 55 def self.last_name Faker::Name.last_name end
string()
click to toggle source
# File lib/mockumentary/data.rb, line 7 def self.string Faker::Lorem.words.join(' ') end
text()
click to toggle source
# File lib/mockumentary/data.rb, line 11 def self.text Faker::Lorem.sentences.join(' ') end
time()
click to toggle source
# File lib/mockumentary/data.rb, line 27 def self.time Time.now + rand(60) * (3600*24) end
timestamp()
click to toggle source
# File lib/mockumentary/data.rb, line 31 def self.timestamp time end