Sha256: 01df9b5a64934d7b045ec3d8fc8769c0ddc0273a0fe9dc73ab58b75cadf363a0
Contents?: true
Size: 756 Bytes
Versions: 39
Compression:
Stored size: 756 Bytes
Contents
module Promethee::StructureUpgrader::Components class Base def initialize(data) @data = data # puts "<#{self.class}> Initialized." upgrade end def upgraded_data @upgraded_data end def upgrade @upgraded_data = @data.deep_dup @upgraded_data['attributes'] ||= {} return if @upgraded_data['attributes'].empty? @upgraded_data['attributes'] = upgraded_attributes.deep_stringify_keys end def upgraded_attributes raise NotImplementedError end protected def string_attribute(*path) text = attribute(*path) Loofah.fragment(text).text(encode_special_chars: false) end def attribute(*path) @data.dig('attributes', *path) end end end
Version data entries
39 entries across 39 versions & 1 rubygems