Class: CardDB::RulesetVersion
Instance Attribute Summary
Attributes inherited from Resource
#client, #data
Instance Method Summary
collapse
Methods inherited from Resource
#[], #initialize, #key?, #to_h, #to_json
Instance Method Details
#active? ⇒ Boolean
2118
|
# File 'lib/carddb/collection.rb', line 2118
def active? = status == 'ACTIVE'
|
#card_dataset_id ⇒ Object
2102
|
# File 'lib/carddb/collection.rb', line 2102
def card_dataset_id = data['cardDatasetId']
|
#card_dataset_version_id ⇒ Object
2103
|
# File 'lib/carddb/collection.rb', line 2103
def card_dataset_version_id = data['cardDatasetVersionId']
|
#changelog ⇒ Object
2110
|
# File 'lib/carddb/collection.rb', line 2110
def changelog = data['changelog']
|
#created_at ⇒ Object
2115
|
# File 'lib/carddb/collection.rb', line 2115
def created_at = parse_time(data['createdAt'])
|
#created_by_account_id ⇒ Object
2111
|
# File 'lib/carddb/collection.rb', line 2111
def created_by_account_id = data['createdByAccountId']
|
#draft? ⇒ Boolean
2117
|
# File 'lib/carddb/collection.rb', line 2117
def draft? = status == 'DRAFT'
|
#effective_at ⇒ Object
2109
|
# File 'lib/carddb/collection.rb', line 2109
def effective_at = parse_time(data['effectiveAt'])
|
#gameplay ⇒ Object
2100
|
# File 'lib/carddb/collection.rb', line 2100
def gameplay = rules['gameplay'] || {}
|
#id ⇒ Object
2095
|
# File 'lib/carddb/collection.rb', line 2095
def id = data['id']
|
#match ⇒ Object
2101
|
# File 'lib/carddb/collection.rb', line 2101
def match = rules['match'] || {}
|
#published_at ⇒ Object
2113
|
# File 'lib/carddb/collection.rb', line 2113
def published_at = parse_time(data['publishedAt'])
|
#published_by_account_id ⇒ Object
2112
|
# File 'lib/carddb/collection.rb', line 2112
def published_by_account_id = data['publishedByAccountId']
|
#rules ⇒ Object
2099
|
# File 'lib/carddb/collection.rb', line 2099
def rules = data['rules'] || {}
|
#rules_fingerprint ⇒ Object
2108
|
# File 'lib/carddb/collection.rb', line 2108
def rules_fingerprint = data['rulesFingerprint']
|
#ruleset_id ⇒ Object
2096
|
# File 'lib/carddb/collection.rb', line 2096
def ruleset_id = data['rulesetId']
|
#section_definitions ⇒ Object
2120
2121
2122
2123
2124
|
# File 'lib/carddb/collection.rb', line 2120
def section_definitions
@section_definitions ||= (data['sectionDefinitions'] || []).map do |definition|
DeckSectionDefinition.new(definition, client: client)
end
end
|
#source_dataset_id ⇒ Object
2104
|
# File 'lib/carddb/collection.rb', line 2104
def source_dataset_id = data['sourceDatasetId']
|
#source_dataset_record_id ⇒ Object
2106
|
# File 'lib/carddb/collection.rb', line 2106
def source_dataset_record_id = data['sourceDatasetRecordId']
|
#source_dataset_version_id ⇒ Object
2105
|
# File 'lib/carddb/collection.rb', line 2105
def source_dataset_version_id = data['sourceDatasetVersionId']
|
#source_record_identifier ⇒ Object
2107
|
# File 'lib/carddb/collection.rb', line 2107
def source_record_identifier = data['sourceRecordIdentifier']
|
#status ⇒ Object
2098
|
# File 'lib/carddb/collection.rb', line 2098
def status = data['status']
|
#superseded_at ⇒ Object
2114
|
# File 'lib/carddb/collection.rb', line 2114
def superseded_at = parse_time(data['supersededAt'])
|
#updated_at ⇒ Object
2116
|
# File 'lib/carddb/collection.rb', line 2116
def updated_at = parse_time(data['updatedAt'])
|
#version_label ⇒ Object
2097
|
# File 'lib/carddb/collection.rb', line 2097
def version_label = data['versionLabel']
|