Class: C80MapFloors::Area

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/c80_map_floors/area.rb

Instance Method Summary collapse

Instance Method Details

#my_as_json4Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/models/c80_map_floors/area.rb', line 10

def my_as_json4

  result = {
      id:         self.id,
      tag:        self.tag,
      floor_id:   self.floor_id,
      class_name: self.class_name,
      coords:     self.coords,
      data:       nil
  }

  if self.area_representator.present?
    result[:data] = self.area_representator.my_as_json2
  end

  result.as_json
end