Exception: SpreadsheetArchitect::Exceptions::InvalidRangeError
- Inherits:
-
StandardError
- Object
- StandardError
- SpreadsheetArchitect::Exceptions::InvalidRangeError
- Defined in:
- lib/spreadsheet_architect/exceptions.rb
Instance Method Summary collapse
-
#initialize(type, range) ⇒ InvalidRangeError
constructor
A new instance of InvalidRangeError.
Constructor Details
#initialize(type, range) ⇒ InvalidRangeError
Returns a new instance of InvalidRangeError.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/spreadsheet_architect/exceptions.rb', line 5 def initialize(type, range) case type when :columns, :rows super("Invalid range `#{range}` passed. Some of the #{type} specified were greater than the total number of #{type}") when :format super("Invalid range `#{range}` passed. Format must be as follows: A1:D4") when :type super("Invalid range type `#{range}`. Valid types are String and Hash") else super("Invalid range `#{range}` passed.") end end |