Sha256: 79a0e9cd07a8dcf9bd2087b584884dcccc553596012a666a6ac8da0d3c5271af

Contents?: true

Size: 602 Bytes

Versions: 3

Compression:

Stored size: 602 Bytes

Contents

module Demode
  module Generator
    class << self

      def name(id)
        first_name = Fields.get(id,:first_names)
        last_name  = Fields.get(id,:last_names)
        [first_name, last_name].join(' ')
      end

      def email(id)
        prefix = username(id)
        suffix = Fields.get(id,:free_emails)
        [prefix, suffix].join('@')
      end

      def username(id)
        format = Fields.get(id,:username_formats)
        first_name = Fields.get(id,:first_names)
        last_name  = Fields.get(id,:last_names)
        format.call(first_name,last_name)
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
demode-0.0.3 lib/demode/generator/person.rb
demode-0.0.2 lib/demode/generator/person.rb
demode-0.0.1 lib/demode/generator/person.rb