Sha256: baeaeaeee247d3c727485bbfb8cdec1991150bb4d9ad85d99e6b68eb192b41aa
Contents?: true
Size: 581 Bytes
Versions: 76
Compression:
Stored size: 581 Bytes
Contents
# frozen_string_literal: true module LHS::Problems class Warnings < Base def initialize(raw, record = nil) @raw = raw @record = record @codes = {}.with_indifferent_access @messages = warnings_from_raw end private def warnings_from_raw messages = {} return messages if !raw.is_a?(Hash) || raw[:field_warnings].blank? raw[:field_warnings].each do |field_warning| add_error(messages, field_warning[:path].join('.').to_sym, field_warning[:code]) end messages.with_indifferent_access end end end
Version data entries
76 entries across 76 versions & 1 rubygems