class DivyGridError

Public Class Methods

new(msg_type = :default) click to toggle source
Calls superclass method
# File lib/divy/divygrid_error.rb, line 2
def initialize(msg_type = :default)
  msg = {
    default: 'DivyGrid not so divy',
    hex: 'Hex color not valid',
    content_type: 'Content inputs must be an array of hashes',
    content_hsh: "Content type must be of format {type: html/image/none, value: '', location: [num, num]",
    container_size: 'Invalid input format, must be an array of integer numbers, or percentages as a string',
    num_array: 'Invalid input format, must be an array of numbers of length 2'
  }[msg_type]
  super(msg)
end