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
2061
2062
2063
2064
2065
|
# File 'lib/carddb/collection.rb', line 2061
def affected_entries
@affected_entries ||= (data['affectedEntries'] || []).map do |entry|
DeckValidationAffectedEntry.new(entry, client: client)
end
end
|
#blockers ⇒ Object
2053
2054
2055
|
# File 'lib/carddb/collection.rb', line 2053
def blockers
@blockers ||= (data['blockers'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|
#checked_at ⇒ Object
2051
|
# File 'lib/carddb/collection.rb', line 2051
def checked_at = parse_time(data['checkedAt'])
|
#deck_id ⇒ Object
2049
|
# File 'lib/carddb/collection.rb', line 2049
def deck_id = data['deckId']
|
#valid? ⇒ Boolean
2050
|
# File 'lib/carddb/collection.rb', line 2050
def valid? = !!data['valid']
|
#validated_against ⇒ Object
2067
2068
2069
|
# File 'lib/carddb/collection.rb', line 2067
def validated_against
@validated_against ||= DeckValidatedAgainst.new(data['validatedAgainst'], client: client)
end
|
#warnings ⇒ Object
2057
2058
2059
|
# File 'lib/carddb/collection.rb', line 2057
def warnings
@warnings ||= (data['warnings'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|