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



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

def card_aspect_ratio = data['cardAspectRatio']

#configObject



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

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

#coordinate_spaceObject



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

def coordinate_space = data['coordinateSpace']

#created_atObject



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

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

#dataset_keyObject



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

def dataset_key = data['datasetKey']

#default?Boolean

Returns:

  • (Boolean)


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

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

#example_file_idObject



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

def example_file_id = data['exampleFileId']

#game_keyObject



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

def game_key = data['gameKey']

#idObject



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

def id = data['id']

#keyObject



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

def key = data['key']

#nameObject



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

def name = data['name']

#notesObject



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

def notes = data['notes']

#publisher_slugObject



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

def publisher_slug = data['publisherSlug']

#regionsObject



1205
1206
1207
# File 'lib/carddb/collection.rb', line 1205

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

#statusObject



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

def status = data['status']

#updated_atObject



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

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

#versionObject



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

def version = data['version']