Method: Fitting::Doc::JsonSchema#report

Defined in:
lib/fitting/doc/json_schema.rb

#report(res, index) ⇒ Object



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/fitting/doc/json_schema.rb', line 86

def report(res, index)
  @index_before = index
  @res_before = [] + res

  index = mark_range(index, res)
  @index_medium = index
  @res_medium = [] + res

  if @next_steps != []
    new_index = index
    @next_steps.each do |next_step|
      if @oneOf
        res, new_index = next_step.report(res, new_index)
      else
        res, new_index = next_step.report(res, @index_before)
      end
    end
  end

  index += index_offset
  @index_after = index
  @res_after = [] + res
  [res, index]
end