Exception: SpreadsheetArchitect::Exceptions::BadRangeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/spreadsheet_architect/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ BadRangeError

Returns a new instance of BadRangeError.



35
36
37
38
39
40
41
42
43
44
# File 'lib/spreadsheet_architect/exceptions.rb', line 35

def initialize(type)
  case type
  when :columns, :rows
    super("Bad range passed. Some of the #{type} specified were greater than the total number of #{type}")
  when :format
    super('Bad range passed. Format must be as follows: A1:D4')
  when :type
    super('Incorrect range type. Valid types are String and Hash')
  end
end