Class: ZombieBattleground::Api::Requests::GetDeckRequest

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, RequestHelper, ValidationHelper
Defined in:
lib/zombie_battleground/api/requests/get_deck_request.rb

Overview

Request validator for GetDeck

Constant Summary

Constants included from RequestHelper

RequestHelper::BLACKLISTED_INSTANCE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idInteger

Deck’s id

Examples:

request.id #=> 1812

Returns:

  • (Integer)


28
29
30
# File 'lib/zombie_battleground/api/requests/get_deck_request.rb', line 28

def id
  @id
end

Instance Method Details

#paramsHash

Deck does not take params, return an empty Hash

Examples:

request.params # => {}

Returns:

  • (Hash)


54
55
56
# File 'lib/zombie_battleground/api/requests/get_deck_request.rb', line 54

def params
  {}
end

#uriString

The URI for the endpoint

Examples:

request.uri # => "deck/1812"

Returns:

  • (String)


41
42
43
# File 'lib/zombie_battleground/api/requests/get_deck_request.rb', line 41

def uri
  "deck/#{id}"
end