Exception: SpreadsheetArchitect::Exceptions::BadRangeError
- Inherits:
-
StandardError
- Object
- StandardError
- SpreadsheetArchitect::Exceptions::BadRangeError
- Defined in:
- lib/spreadsheet_architect/exceptions.rb
Instance Method Summary collapse
-
#initialize(type, range) ⇒ BadRangeError
constructor
A new instance of BadRangeError.
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 |