class V1::TeamSerializer
Serializes a Team with the following attributes:
-
:id
-
:first_player
-
:second_player
Public Instance Methods
first_player()
click to toggle source
Serialize the first player on the team
-
Returns : V1::PlayerSerializer
# File app/serializers/v1/team_serializer.rb, line 11 def first_player V1::PlayerSerializer.new(object.first_player) end
second_player()
click to toggle source
Serialize the second player on the team
-
Returns : V1::PlayerSerializer
# File app/serializers/v1/team_serializer.rb, line 17 def second_player V1::PlayerSerializer.new(object.second_player) end