Class: ZombieBattleground::Api::Responses::GetMatchResponse
- Inherits:
-
Object
- Object
- ZombieBattleground::Api::Responses::GetMatchResponse
- Includes:
- ActiveModel::Validations, ResponseHelper, ValidationHelper
- Defined in:
- lib/zombie_battleground/api/responses/get_match_response.rb
Overview
Response validator for GetMatch
Instance Attribute Summary collapse
-
#match ⇒ ZombieBattleground::Api::Models::Match
readonly
the match.
Instance Method Summary collapse
-
#initialize(response) ⇒ ZombieBattleground::Api::GetMatchResponse
constructor
Creates a new GetMatchResponse.
Constructor Details
#initialize(response) ⇒ ZombieBattleground::Api::GetMatchResponse
Creates a new GetMatchResponse
46 47 48 49 50 |
# File 'lib/zombie_battleground/api/responses/get_match_response.rb', line 46 def initialize(response) handle_errors(response) @match = ZombieBattleground::Api::Models::Match.new(JSON.parse(response.body)) end |
Instance Attribute Details
#match ⇒ ZombieBattleground::Api::Models::Match (readonly)
the match
30 31 32 |
# File 'lib/zombie_battleground/api/responses/get_match_response.rb', line 30 def match @match end |