Sha256: 67a7dbdf02448c421c0d80176ee9c3926d9edd27d009ee5b49e9cf01dd80a6c5
Contents?: true
Size: 661 Bytes
Versions: 11
Compression:
Stored size: 661 Bytes
Contents
module Martyr module Schema class LevelAssociationCollection < HashWithIndifferentAccess include Martyr::LevelCollection # @param level [String, Symbol] # @return [LevelAssociation] def has_dimension_level(level, **args) level_definition = dimension_definition.levels[level] raise Schema::Error.new("Could not find level `#{level}` for dimension #{dimension_name}") unless level_definition level_association = LevelAssociation.new(self, level_definition, **args) register level_association arr = sort_by{|_name, level| level.to_i} clear.merge!(Hash[arr]) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems