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
2063
|
# File 'lib/carddb/collection.rb', line 2063
def applied? = !!data['applied']
|
#deck ⇒ Object
2059
2060
2061
|
# File 'lib/carddb/collection.rb', line 2059
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2072
2073
2074
|
# File 'lib/carddb/collection.rb', line 2072
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2064
|
# File 'lib/carddb/collection.rb', line 2064
def dry_run? = !!data['dryRun']
|
2066
|
# File 'lib/carddb/collection.rb', line 2066
def format = data['format']
|
2068
2069
2070
|
# File 'lib/carddb/collection.rb', line 2068
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2076
2077
2078
|
# File 'lib/carddb/collection.rb', line 2076
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2065
|
# File 'lib/carddb/collection.rb', line 2065
def replace? = !!data['replace']
|
#validation ⇒ Object
2080
2081
2082
|
# File 'lib/carddb/collection.rb', line 2080
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|