lib/faker_maker/attribute.rb in faker_maker-1.1.1 vs lib/faker_maker/attribute.rb in faker_maker-1.1.2
- old
+ new
@@ -4,10 +4,10 @@
attr_reader :name, :block, :translation
def initialize( name, block = nil, options = {} )
assert_valid_options options
@name = name
- @block = block
+ @block = block || proc { nil }
@cardinality = options[:has] || 1
@translation = options[:json]
@array = options[:array] == true
end