Sha256: 62bd0f39cb14ec4f63fdabfdcd3985483482f5fde9a10aeb8d54c2efe1aa1ccb
Contents?: true
Size: 304 Bytes
Versions: 3
Compression:
Stored size: 304 Bytes
Contents
module Pseudonymize class Name attr_reader :options def initialize(name, **options) @name = name @options = options end def result @name.split.map do |name| "#{name[0]}#{options[:censor] * (name.length - 1)}" end.join(' ') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pseudonymize-0.0.5 | lib/pseudonymize/name.rb |
pseudonymize-0.0.4 | lib/pseudonymize/name.rb |
pseudonymize-0.0.3 | lib/pseudonymize/name.rb |