Sha256: ac0964ca4a171e72f1b37847b3befd3818ce6a3cd213a71ea5b2aef780f1dedb
Contents?: true
Size: 519 Bytes
Versions: 4
Compression:
Stored size: 519 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 = Array(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
4 entries across 4 versions & 1 rubygems