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



2114
2115
2116
# File 'lib/carddb/collection.rb', line 2114

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

#entriesObject



2118
2119
2120
# File 'lib/carddb/collection.rb', line 2118

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