Class: ShelbyArena::Response::Person

Inherits:
Base
  • Object
show all
Defined in:
lib/shelby_arena/response/person.rb

Constant Summary collapse

MAP =
{
  age: 'Age',
  first_name: 'FirstName',
  last_name: 'LastName',
  person_id: 'PersonID',
  person_link: 'PersonLink',
  gender: 'Gender'
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#data

Instance Method Summary collapse

Methods inherited from Base

#date_parse, #format, format, #format_list, format_list, #initialize, #to_boolean, #to_h

Constructor Details

This class inherits a constructor from ShelbyArena::Response::Base

Instance Method Details

#format_single(data) ⇒ Object



13
14
15
16
17
18
# File 'lib/shelby_arena/response/person.rb', line 13

def format_single(data)
  response = to_h(MAP, data)
  response[:email] = set_email(data)
  response[:emails] = set_emails(data)
  response
end