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
2040
|
# File 'lib/carddb/collection.rb', line 2040
def applied? = !!data['applied']
|
#deck ⇒ Object
2036
2037
2038
|
# File 'lib/carddb/collection.rb', line 2036
def deck
@deck ||= data['deck'] ? Deck.new(data['deck'], client: client) : nil
end
|
#detection ⇒ Object
2049
2050
2051
|
# File 'lib/carddb/collection.rb', line 2049
def detection
@detection ||= data['detection'] ? DeckImportFormatDetection.new(data['detection'], client: client) : nil
end
|
#dry_run? ⇒ Boolean
2041
|
# File 'lib/carddb/collection.rb', line 2041
def dry_run? = !!data['dryRun']
|
2043
|
# File 'lib/carddb/collection.rb', line 2043
def format = data['format']
|
2045
2046
2047
|
# File 'lib/carddb/collection.rb', line 2045
def import_format
@import_format ||= data['importFormat'] ? DeckImportFormatDefinition.new(data['importFormat'], client: client) : nil
end
|
#parse_errors ⇒ Object
2053
2054
2055
|
# File 'lib/carddb/collection.rb', line 2053
def parse_errors
@parse_errors ||= (data['parseErrors'] || []).map { |issue| DeckImportIssue.new(issue, client: client) }
end
|
#replace? ⇒ Boolean
2042
|
# File 'lib/carddb/collection.rb', line 2042
def replace? = !!data['replace']
|
#validation ⇒ Object
2057
2058
2059
|
# File 'lib/carddb/collection.rb', line 2057
def validation
@validation ||= data['validation'] ? DeckValidation.new(data['validation'], client: client) : nil
end
|