Class: CardDB::DeckValidation
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#affected_entries ⇒ Object
1347
1348
1349
1350
1351
|
# File 'lib/carddb/collection.rb', line 1347
def affected_entries
@affected_entries ||= (data['affectedEntries'] || []).map do |entry|
DeckValidationAffectedEntry.new(entry, client: client)
end
end
|
#blockers ⇒ Object
1339
1340
1341
|
# File 'lib/carddb/collection.rb', line 1339
def blockers
@blockers ||= (data['blockers'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|
#checked_at ⇒ Object
1337
|
# File 'lib/carddb/collection.rb', line 1337
def checked_at = parse_time(data['checkedAt'])
|
#deck_id ⇒ Object
1335
|
# File 'lib/carddb/collection.rb', line 1335
def deck_id = data['deckId']
|
#valid? ⇒ Boolean
1336
|
# File 'lib/carddb/collection.rb', line 1336
def valid? = !!data['valid']
|
#validated_against ⇒ Object
1353
1354
1355
|
# File 'lib/carddb/collection.rb', line 1353
def validated_against
@validated_against ||= DeckValidatedAgainst.new(data['validatedAgainst'], client: client)
end
|
#warnings ⇒ Object
1343
1344
1345
|
# File 'lib/carddb/collection.rb', line 1343
def warnings
@warnings ||= (data['warnings'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|