class DataAnon::Strategy::Field::RandomFirstName
Randomly picks up first name from the predefined list in the file. Default [file](raw.github.com/sunitparekh/data-anonymization/master/resources/first_names.txt) is part of the gem. File should contain first name on each line.
!!!ruby ```ruby anonymize('FirstName').using FieldStrategy::RandomFirstName.new !!!ruby anonymize('FirstName').using FieldStrategy::RandomFirstName.new('my_first_names.txt')
Public Class Methods
new(file_path = nil)
click to toggle source
Calls superclass method
# File lib/strategy/field/name/random_first_name.rb, line 17 def initialize file_path = nil super(file_path || DataAnon::Utils::Resource.file('first_names.txt')) end