Exception: SpreadsheetArchitect::Exceptions::InvalidRangeOptionError

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

Instance Method Summary collapse

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
    message = ":#{key} can be an integer, range, or :all"
  end

  super([default_msg, message].compact.join(". "))
end