Sha256: 6abbb6246b0eceb84445fabe9431f8c01acd16098e59656af90f3d74d2ea470e
Contents?: true
Size: 536 Bytes
Versions: 5
Compression:
Stored size: 536 Bytes
Contents
# frozen_string_literal: true module Leftovers class ConfigLoader class InheritSchemaAttributes def initialize(schema, require_group: true, except: nil) @schema = schema @use_require_groups = require_group @except = Leftovers.each_or_self(except) end def attributes @schema.attributes.map do |attr| next if @except.include?(attr.name) next attr.without_require_group unless @use_require_groups attr end.compact end end end end
Version data entries
5 entries across 5 versions & 1 rubygems