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
1864
1865
1866
1867
1868
|
# File 'lib/carddb/collection.rb', line 1864
def affected_entries
@affected_entries ||= (data['affectedEntries'] || []).map do |entry|
DeckValidationAffectedEntry.new(entry, client: client)
end
end
|
#blockers ⇒ Object
1856
1857
1858
|
# File 'lib/carddb/collection.rb', line 1856
def blockers
@blockers ||= (data['blockers'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|
#checked_at ⇒ Object
1854
|
# File 'lib/carddb/collection.rb', line 1854
def checked_at = parse_time(data['checkedAt'])
|
#deck_id ⇒ Object
1852
|
# File 'lib/carddb/collection.rb', line 1852
def deck_id = data['deckId']
|
#valid? ⇒ Boolean
1853
|
# File 'lib/carddb/collection.rb', line 1853
def valid? = !!data['valid']
|
#validated_against ⇒ Object
1870
1871
1872
|
# File 'lib/carddb/collection.rb', line 1870
def validated_against
@validated_against ||= DeckValidatedAgainst.new(data['validatedAgainst'], client: client)
end
|
#warnings ⇒ Object
1860
1861
1862
|
# File 'lib/carddb/collection.rb', line 1860
def warnings
@warnings ||= (data['warnings'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|