Exception: SpreadsheetArchitect::Exceptions::InvalidRangeOptionError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- ArgumentError
- SpreadsheetArchitect::Exceptions::InvalidRangeOptionError
- Defined in:
- lib/spreadsheet_architect/exceptions.rb
Instance Method Summary collapse
-
#initialize(key, opt) ⇒ InvalidRangeOptionError
constructor
A new instance of InvalidRangeOptionError.
Constructor Details
#initialize(key, opt) ⇒ InvalidRangeOptionError
Returns a new instance of InvalidRangeOptionError.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/spreadsheet_architect/exceptions.rb', line 48 def initialize(key, opt) default_msg = "Invalid :#{key} option for `#{opt}`" case key when :columns, :rows = ":#{key} can be an integer, range, or :all" end super([default_msg, ].compact.join(". ")) end |