Exception: RuneterraCards::UnrecognizedVersionError
- Inherits:
-
DeckCodeParseError
- Object
- StandardError
- DeckCodeParseError
- RuneterraCards::UnrecognizedVersionError
- Defined in:
- lib/runeterra_cards/errors.rb
Overview
This exception is raised if the deck code version number in the deck code is not one we can handle. This could mean this isn’t a deck code (especially if the version number is very different to the one expected), or it could mean Riot has updated the deck code version and you need to update this library.
If updating this library fails to resolve the issue, and you are sure this is a deck code, check GitHub for an issue relating to this. If none exists, then file one!
Instance Attribute Summary collapse
-
#version ⇒ Fixnum
The version number encountered in the deck code.
Instance Method Summary collapse
-
#initialize(expected, got) ⇒ UnrecognizedVersionError
constructor
A new instance of UnrecognizedVersionError.
Constructor Details
#initialize(expected, got) ⇒ UnrecognizedVersionError
Returns a new instance of UnrecognizedVersionError.
40 41 42 43 44 45 |
# File 'lib/runeterra_cards/errors.rb', line 40 def initialize(expected, got) super( "Unrecognized deck code version number: #{got}, was expecting: #{expected}. "\ 'Possibly an invalid deck code, possibly you need to update the deck code library version.') @version = got end |
Instance Attribute Details
#version ⇒ Fixnum
Returns the version number encountered in the deck code.
36 37 38 |
# File 'lib/runeterra_cards/errors.rb', line 36 def version @version end |