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
1523
|
# File 'lib/carddb/collection.rb', line 1523
def applied? = !!data['applied']
|
#deck ⇒ Object
1519
1520
1521
|
# File 'lib/carddb/collection.rb', line 1519
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
1532
1533
1534
|
# File 'lib/carddb/collection.rb', line 1532
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
1524
|
# File 'lib/carddb/collection.rb', line 1524
def dry_run? = !!data['dryRun']
|
1526
|
# File 'lib/carddb/collection.rb', line 1526
def format = data['format']
|
1528
1529
1530
|
# File 'lib/carddb/collection.rb', line 1528
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
1536
1537
1538
|
# File 'lib/carddb/collection.rb', line 1536
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
1525
|
# File 'lib/carddb/collection.rb', line 1525
def replace? = !!data['replace']
|
#validation ⇒ Object
1540
1541
1542
|
# File 'lib/carddb/collection.rb', line 1540
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|