class DbcFaker::Cohort

Public Class Methods

bs(num_of_adjectives = 2) click to toggle source
# File lib/faker/cohort.rb, line 9
def self.bs(num_of_adjectives = 2)
  selected_animal = ALL_ANIMALS.sample
  selected_letter_sym = selected_animal[0].downcase.to_sym
  selected_adjectives = ALL_ADJECTIVES[selected_letter_sym]
  selected_adjectives = selected_adjectives.shuffle.pop(num_of_adjectives)
  selected_adjectives_string = selected_adjectives.map!{|word| word.capitalize}.join(' ')
  cohort_name = "#{selected_adjectives_string} #{selected_animal}s"
end
name() click to toggle source
# File lib/faker/cohort.rb, line 5
def self.name
  COHORTS.sample
end