Exception: RuneterraCards::UnrecognizedFactionError
- Inherits:
-
DeckCodeParseError
- Object
- StandardError
- DeckCodeParseError
- RuneterraCards::UnrecognizedFactionError
- Defined in:
- lib/runeterra_cards/errors.rb
Overview
This exception is raised if the deck code contains an unexpected faction number. (see the table at https://github.com/RiotGames/LoRDeckCodes for what ‘faction number’ means.) This most likely means that Legends of Runeterra has a new faction and you need to update to a newer version of this library to handle it.
Check that the #faction_number causing issues is listed in the table on Github. If it isn’t then something else has gone wrong. If it is, and updating this library doesn’t fix the issue, then the library needs updating - file an issue.
Instance Attribute Summary collapse
-
#faction_number ⇒ Fixnum
readonly
The faction number that was unrecognized.
Instance Method Summary collapse
-
#initialize(faction_number) ⇒ UnrecognizedFactionError
constructor
A new instance of UnrecognizedFactionError.
Constructor Details
#initialize(faction_number) ⇒ UnrecognizedFactionError
Returns a new instance of UnrecognizedFactionError.
60 61 62 63 64 65 |
# File 'lib/runeterra_cards/errors.rb', line 60 def initialize(faction_number) super( "Unrecognized faction number '#{faction_number}'."\ ' Possibly you need to update this library to a newer version') @faction_number = faction_number end |
Instance Attribute Details
#faction_number ⇒ Fixnum (readonly)
Returns the faction number that was unrecognized.
57 58 59 |
# File 'lib/runeterra_cards/errors.rb', line 57 def faction_number @faction_number end |