Class: CardDB::DeckEntryReorderPayload

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

Direct Known Subclasses

DeckEntriesReplacePayload

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

#deckObject



1940
1941
1942
# File 'lib/carddb/collection.rb', line 1940

def deck
  @deck ||= Deck.new(data['deck'], client: client)
end

#entriesObject



1944
1945
1946
# File 'lib/carddb/collection.rb', line 1944

def entries
  @entries ||= (data['entries'] || []).map { |entry| DeckEntry.new(entry, client: client) }
end