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
2237
|
# File 'lib/carddb/collection.rb', line 2237
def applied? = !!data['applied']
|
#deck ⇒ Object
2233
2234
2235
|
# File 'lib/carddb/collection.rb', line 2233
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2246
2247
2248
|
# File 'lib/carddb/collection.rb', line 2246
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2238
|
# File 'lib/carddb/collection.rb', line 2238
def dry_run? = !!data['dryRun']
|
2240
|
# File 'lib/carddb/collection.rb', line 2240
def format = data['format']
|
2242
2243
2244
|
# File 'lib/carddb/collection.rb', line 2242
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2250
2251
2252
|
# File 'lib/carddb/collection.rb', line 2250
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2239
|
# File 'lib/carddb/collection.rb', line 2239
def replace? = !!data['replace']
|
#validation ⇒ Object
2254
2255
2256
|
# File 'lib/carddb/collection.rb', line 2254
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|