Class: DataAnon::Strategy::Field::Anonymous

Inherits:
Object
  • Object
show all
Defined in:
lib/strategy/field/anonymous.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Anonymous

Returns a new instance of Anonymous.


8
9
10
# File 'lib/strategy/field/anonymous.rb', line 8

def initialize &block
  @block = block
end

Instance Method Details

#anonymize(field) ⇒ Object


12
13
14
# File 'lib/strategy/field/anonymous.rb', line 12

def anonymize field
  @block.call field
end