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
2337
|
# File 'lib/carddb/collection.rb', line 2337
def applied? = !!data['applied']
|
#deck ⇒ Object
2333
2334
2335
|
# File 'lib/carddb/collection.rb', line 2333
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2346
2347
2348
|
# File 'lib/carddb/collection.rb', line 2346
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2338
|
# File 'lib/carddb/collection.rb', line 2338
def dry_run? = !!data['dryRun']
|
2340
|
# File 'lib/carddb/collection.rb', line 2340
def format = data['format']
|
2342
2343
2344
|
# File 'lib/carddb/collection.rb', line 2342
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2350
2351
2352
|
# File 'lib/carddb/collection.rb', line 2350
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2339
|
# File 'lib/carddb/collection.rb', line 2339
def replace? = !!data['replace']
|
#validation ⇒ Object
2354
2355
2356
|
# File 'lib/carddb/collection.rb', line 2354
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|