Class: CardDB::DeckImportPayload
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
#ambiguous, #entries, #unmatched
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#applied? ⇒ Boolean
2324
|
# File 'lib/carddb/collection.rb', line 2324
def applied? = !!data['applied']
|
#deck ⇒ Object
2320
2321
2322
|
# File 'lib/carddb/collection.rb', line 2320
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2333
2334
2335
|
# File 'lib/carddb/collection.rb', line 2333
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2325
|
# File 'lib/carddb/collection.rb', line 2325
def dry_run? = !!data['dryRun']
|
2327
|
# File 'lib/carddb/collection.rb', line 2327
def format = data['format']
|
2329
2330
2331
|
# File 'lib/carddb/collection.rb', line 2329
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2337
2338
2339
|
# File 'lib/carddb/collection.rb', line 2337
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2326
|
# File 'lib/carddb/collection.rb', line 2326
def replace? = !!data['replace']
|
#validation ⇒ Object
2341
2342
2343
|
# File 'lib/carddb/collection.rb', line 2341
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|