Class: RockRMS::Response::Group
- Defined in:
- lib/rock_rms/response/group.rb
Constant Summary collapse
- MAP =
{ name: 'Name', group_type_id: 'GroupTypeId', parent_group_id: 'ParentGroupId', campus_id: 'CampusId', is_active: 'IsActive', guid: 'Guid', members: 'Members' }.freeze
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
format, #format, #format_attributes, #initialize, #to_h
Constructor Details
This class inherits a constructor from RockRMS::Response::Base
Instance Method Details
#format_single(data) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/rock_rms/response/group.rb', line 14 def format_single(data) result = to_h(MAP, data) if group_locations = data['GroupLocations'] result[:group_locations] = GroupLocation.format(group_locations) end if campus = data['Campus'] result[:campus] = Campus.format(campus) end result end |