lib/anony/field_level_strategies.rb in anony-1.0.1 vs lib/anony/field_level_strategies.rb in anony-1.0.2
- old
+ new
@@ -44,10 +44,10 @@
#
# class Manager
# anonymise { forty_two :date_of_birth }
# end
def self.register(name, klass_or_constant = nil, &block)
- if block_given?
+ if block
strategy = block
elsif !klass_or_constant.nil?
strategy = klass_or_constant
else
raise ArgumentError, "Must pass either a block, constant value or strategy class"