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
2398
|
# File 'lib/carddb/collection.rb', line 2398
def applied? = !!data['applied']
|
#deck ⇒ Object
2394
2395
2396
|
# File 'lib/carddb/collection.rb', line 2394
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2407
2408
2409
|
# File 'lib/carddb/collection.rb', line 2407
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2399
|
# File 'lib/carddb/collection.rb', line 2399
def dry_run? = !!data['dryRun']
|
2401
|
# File 'lib/carddb/collection.rb', line 2401
def format = data['format']
|
2403
2404
2405
|
# File 'lib/carddb/collection.rb', line 2403
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2411
2412
2413
|
# File 'lib/carddb/collection.rb', line 2411
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2400
|
# File 'lib/carddb/collection.rb', line 2400
def replace? = !!data['replace']
|
#validation ⇒ Object
2415
2416
2417
|
# File 'lib/carddb/collection.rb', line 2415
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|