Module: C80Map::BuildingRepresentator::InstanceMethods

Defined in:
app/models/c80_map/building_representator.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'app/models/c80_map/building_representator.rb', line 45

def to_hash

  Rails.logger.debug "<BuildingRepresentator.to_hash> self.free_square = #{self.free_square}"

  res = {
      id: self.id,
      title: self.title,
      props: {
          square: self.square,
          free_square: self.free_square,
          floor_height: self.floor_height,
          gate_type: self.gate_type,
          desc: self.desc,
          column_step: self.column_step,
          communications: self.communications,
          price: self.price_string,
          free_areas_count: self.free_areas_count # NOTE: free_areas_count находися в Rent::Building проекта vorsa
      }
  }
  res
end