Exception: SpreadsheetArchitect::Exceptions::BadRangeError

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

Instance Method Summary collapse

Constructor Details

#initialize(type, range) ⇒ BadRangeError



41
42
43
44
45
46
47
48
49
50
# File 'lib/spreadsheet_architect/exceptions.rb', line 41

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