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
2161
2162
2163
2164
2165
|
# File 'lib/carddb/collection.rb', line 2161
def affected_entries
@affected_entries ||= (data['affectedEntries'] || []).map do |entry|
DeckValidationAffectedEntry.new(entry, client: client)
end
end
|
#blockers ⇒ Object
2153
2154
2155
|
# File 'lib/carddb/collection.rb', line 2153
def blockers
@blockers ||= (data['blockers'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|
#checked_at ⇒ Object
2151
|
# File 'lib/carddb/collection.rb', line 2151
def checked_at = parse_time(data['checkedAt'])
|
#deck_id ⇒ Object
2149
|
# File 'lib/carddb/collection.rb', line 2149
def deck_id = data['deckId']
|
#valid? ⇒ Boolean
2150
|
# File 'lib/carddb/collection.rb', line 2150
def valid? = !!data['valid']
|
#validated_against ⇒ Object
2167
2168
2169
|
# File 'lib/carddb/collection.rb', line 2167
def validated_against
@validated_against ||= DeckValidatedAgainst.new(data['validatedAgainst'], client: client)
end
|
#warnings ⇒ Object
2157
2158
2159
|
# File 'lib/carddb/collection.rb', line 2157
def warnings
@warnings ||= (data['warnings'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|