Sha256: 0ffa7f43b968f2b52009b6245ee22196183307027b8767d16b279e72b993cf5c

Contents?: true

Size: 421 Bytes

Versions: 3

Compression:

Stored size: 421 Bytes

Contents

module MultidimensionalTable
  class NonValidDimension < StandardError
    attr_accessor :duplicate
    def initialize(duplicate)
      @duplicate = duplicate
    end

    def to_s
      "Multiple definitions are not allowed : #{represent_duplicates}"
    end

    def represent_duplicates
      duplicate.map do |key, value|
         "#{key} for dimension " << value.join(' and ')
      end.join(', ')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
multidimensional_table-1.1.0 lib/multidimensional_table/non_valid_dimension.rb
multidimensional_table-1.0.1 lib/multidimensional_table/non_valid_dimension.rb
multidimensional_table-1.0.0 lib/multidimensional_table/non_valid_dimension.rb