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
2510
|
# File 'lib/carddb/collection.rb', line 2510
def applied? = !!data['applied']
|
#deck ⇒ Object
2506
2507
2508
|
# File 'lib/carddb/collection.rb', line 2506
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2519
2520
2521
|
# File 'lib/carddb/collection.rb', line 2519
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2511
|
# File 'lib/carddb/collection.rb', line 2511
def dry_run? = !!data['dryRun']
|
2513
|
# File 'lib/carddb/collection.rb', line 2513
def format = data['format']
|
2515
2516
2517
|
# File 'lib/carddb/collection.rb', line 2515
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2523
2524
2525
|
# File 'lib/carddb/collection.rb', line 2523
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2512
|
# File 'lib/carddb/collection.rb', line 2512
def replace? = !!data['replace']
|
#validation ⇒ Object
2527
2528
2529
|
# File 'lib/carddb/collection.rb', line 2527
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|