Class: Faker::Stories

Inherits:
Object
  • Object
show all
Defined in:
lib/branston/lib/faker_extras.rb

Class Method Summary collapse

Class Method Details

.double_preconditionObject



13
14
15
16
17
18
19
20
21
# File 'lib/branston/lib/faker_extras.rb', line 13

def double_precondition
  r = Faker::Lorem.sentence.chop + " " + Faker::Lorem.sentence 
  out = ""
  r = r.split
  r[2] = '"' + r[2] + '"'
  r[5] = '"' + r[5] + '"'
  r.collect { |s| out += s + " " }
  return out
end

.single_preconditionObject



4
5
6
7
8
9
10
11
# File 'lib/branston/lib/faker_extras.rb', line 4

def single_precondition
  r = Faker::Lorem.sentence
  out = ""
  r = r.split
  r[2] = '"' + r[2] + '"'
  r.collect { |s| out += s + " " }
  return out
end