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



1400
1401
1402
# File 'lib/carddb/collection.rb', line 1400

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

#entriesObject



1404
1405
1406
# File 'lib/carddb/collection.rb', line 1404

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