Class: CardDB::ScanTemplate

Inherits:
Resource show all
Defined in:
lib/carddb/collection.rb

Instance Attribute Summary

Attributes inherited from Resource

#client, #data

Instance Method Summary collapse

Methods inherited from Resource

#[], #initialize, #key?, #to_h, #to_json

Constructor Details

This class inherits a constructor from CardDB::Resource

Instance Method Details

#card_aspect_ratioObject



1136
# File 'lib/carddb/collection.rb', line 1136

def card_aspect_ratio = data['cardAspectRatio']

#configObject



1138
# File 'lib/carddb/collection.rb', line 1138

def config = data['config'] || {}

#coordinate_spaceObject



1135
# File 'lib/carddb/collection.rb', line 1135

def coordinate_space = data['coordinateSpace']

#created_atObject



1139
# File 'lib/carddb/collection.rb', line 1139

def created_at = parse_time(data['createdAt'])

#dataset_keyObject



1133
# File 'lib/carddb/collection.rb', line 1133

def dataset_key = data['datasetKey']

#default?Boolean

Returns:

  • (Boolean)


1130
# File 'lib/carddb/collection.rb', line 1130

def default? = !!data['isDefault']

#example_file_idObject



1134
# File 'lib/carddb/collection.rb', line 1134

def example_file_id = data['exampleFileId']

#game_keyObject



1132
# File 'lib/carddb/collection.rb', line 1132

def game_key = data['gameKey']

#idObject



1125
# File 'lib/carddb/collection.rb', line 1125

def id = data['id']

#keyObject



1126
# File 'lib/carddb/collection.rb', line 1126

def key = data['key']

#nameObject



1127
# File 'lib/carddb/collection.rb', line 1127

def name = data['name']

#notesObject



1137
# File 'lib/carddb/collection.rb', line 1137

def notes = data['notes']

#publisher_slugObject



1131
# File 'lib/carddb/collection.rb', line 1131

def publisher_slug = data['publisherSlug']

#regionsObject



1142
1143
1144
# File 'lib/carddb/collection.rb', line 1142

def regions
  @regions ||= (data['regions'] || []).map { |region| ScanTemplateRegion.new(region, client: client) }
end

#statusObject



1128
# File 'lib/carddb/collection.rb', line 1128

def status = data['status']

#updated_atObject



1140
# File 'lib/carddb/collection.rb', line 1140

def updated_at = parse_time(data['updatedAt'])

#versionObject



1129
# File 'lib/carddb/collection.rb', line 1129

def version = data['version']