Exception: DivyGridError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/divy/divygrid_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg_type = :default) ⇒ DivyGridError

Returns a new instance of DivyGridError.



2
3
4
5
6
7
8
9
10
11
12
# 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