class DataAnon::Strategy::Field::RandomLastName
Randomly picks up last name from the predefined list in the file. Default [file](raw.github.com/sunitparekh/data-anonymization/master/resources/last_names.txt) is part of the gem. File should contain last name on each line.
!!!ruby anonymize('LastName').using FieldStrategy::RandomLastName.new !!!ruby anonymize('LastName').using FieldStrategy::RandomLastName.new('my_last_names.txt')
Public Class Methods
Source
# File lib/strategy/field/name/random_last_name.rb, line 16 def initialize file_path = nil super(file_path || DataAnon::Utils::Resource.file('last_names.txt')) end
Calls superclass method