Sha256: 150abb2083c2b59fbf1b4bd91ab0f90093213e1f391871272b70f360362ec360

Contents?: true

Size: 328 Bytes

Versions: 9

Compression:

Stored size: 328 Bytes

Contents

module Finitio
  module HashBasedType

    def generate_data(generator, world = nil)
      tuple = {}
      heading.each do |a|
        if a.required or generator.flip_coin
          tuple[a.name.to_sym] = generator.call(a.type, world)
        end
      end
      tuple
    end

  end # class HashBasedType
end # module Finitio

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
finitio-0.12.0 lib/finitio/generation/hash_based_type.rb
finitio-0.11.4 lib/finitio/generation/hash_based_type.rb
finitio-0.11.3 lib/finitio/generation/hash_based_type.rb
finitio-0.11.2 lib/finitio/generation/hash_based_type.rb
finitio-0.11.1 lib/finitio/generation/hash_based_type.rb
finitio-0.10.0 lib/finitio/generation/hash_based_type.rb
finitio-0.9.1 lib/finitio/generation/hash_based_type.rb
finitio-0.9.0 lib/finitio/generation/hash_based_type.rb
finitio-0.8.0 lib/finitio/generation/hash_based_type.rb