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
2148
2149
2150
2151
2152
|
# File 'lib/carddb/collection.rb', line 2148
def affected_entries
@affected_entries ||= (data['affectedEntries'] || []).map do |entry|
DeckValidationAffectedEntry.new(entry, client: client)
end
end
|
#blockers ⇒ Object
2140
2141
2142
|
# File 'lib/carddb/collection.rb', line 2140
def blockers
@blockers ||= (data['blockers'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|
#checked_at ⇒ Object
2138
|
# File 'lib/carddb/collection.rb', line 2138
def checked_at = parse_time(data['checkedAt'])
|
#deck_id ⇒ Object
2136
|
# File 'lib/carddb/collection.rb', line 2136
def deck_id = data['deckId']
|
#valid? ⇒ Boolean
2137
|
# File 'lib/carddb/collection.rb', line 2137
def valid? = !!data['valid']
|
#validated_against ⇒ Object
2154
2155
2156
|
# File 'lib/carddb/collection.rb', line 2154
def validated_against
@validated_against ||= DeckValidatedAgainst.new(data['validatedAgainst'], client: client)
end
|
#warnings ⇒ Object
2144
2145
2146
|
# File 'lib/carddb/collection.rb', line 2144
def warnings
@warnings ||= (data['warnings'] || []).map { |issue| DeckValidationIssue.new(issue, client: client) }
end
|