Module: C80Map::AreaRepresentator::InstanceMethods

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

Instance Method Summary collapse

Instance Method Details

#is_free?Boolean

свободна ли площадь, привязанная к полигону на карте

Returns:

  • (Boolean)


63
64
65
66
67
68
69
# File 'app/models/c80_map/area_representator.rb', line 63

def is_free?
  res = true
  if map_areas.count > 0
    res = map_areas.first.is_free?
  end
  res
end

#to_hash_aObject



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'app/models/c80_map/area_representator.rb', line 45

def to_hash_a
  res = {
      id: id,
      title: title,
      props: {
          square: square,
          floor_height: floor_height,
          gate_type: gate_type,
          desc: desc,
          column_step: column_step,
          communications: communications,
          price: price_string
      }
  }
  res
end