Method: Super::Schema::Guesser#call

Defined in:
lib/super/schema/guesser.rb

#callObject



33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/super/schema/guesser.rb', line 33

def call
  result = sorted_attribute_names
  result = @rejects.reduce(result) do |intermediary_result, rejection_proc|
    intermediary_result.reject(&rejection_proc)
  end

  result = result.first(@limit) if @limit && @limit != Float::INFINITY

  result.each do |name|
    @fields[name] = @assign_type.call(name)
  end
end