Class: GBTiles::GBM::Map::MapSet
- Inherits:
-
Object
- Object
- GBTiles::GBM::Map::MapSet
- Defined in:
- lib/gbtiles/gbm/map/map_set.rb
Instance Attribute Summary collapse
-
#objects ⇒ Object
Returns the value of attribute objects.
Instance Method Summary collapse
- #deleted ⇒ Object
-
#initialize ⇒ MapSet
constructor
A new instance of MapSet.
- #map(master_id = nil) ⇒ Object
- #map_export_settings(master_id = nil) ⇒ Object
- #map_settings(master_id = nil) ⇒ Object
- #map_tile_data(master_id = nil) ⇒ Object
- #producer(master_id = nil) ⇒ Object
- #unknown ⇒ Object
Constructor Details
#initialize ⇒ MapSet
Returns a new instance of MapSet.
8 9 10 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 8 def initialize @objects = [] end |
Instance Attribute Details
#objects ⇒ Object
Returns the value of attribute objects.
6 7 8 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 6 def objects @objects end |
Instance Method Details
#deleted ⇒ Object
52 53 54 55 56 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 52 def deleted @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:deleted] } end |
#map(master_id = nil) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 20 def map master_id = nil @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:map] }.select{ |a| master_id.nil? || a.object_id = master_id } end |
#map_export_settings(master_id = nil) ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 44 def map_export_settings master_id = nil @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:map_export_settings] }.select{ |a| master_id.nil? || a.object_id = master_id } end |
#map_settings(master_id = nil) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 36 def map_settings master_id = nil @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:map_settings] }.select{ |a| master_id.nil? || a.object_id = master_id } end |
#map_tile_data(master_id = nil) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 28 def map_tile_data master_id = nil @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:map_tile_data] }.select{ |a| master_id.nil? || a.object_id = master_id } end |
#producer(master_id = nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 12 def producer master_id = nil @objects.select{ |a| a.object_type == GBTiles::GBM::Map::OBJECT_TYPE[:producer] }.select{ |a| master_id.nil? || a.object_id = master_id } end |
#unknown ⇒ Object
58 59 60 61 62 |
# File 'lib/gbtiles/gbm/map/map_set.rb', line 58 def unknown @objects.select{ |a| GBTiles::GBM::Map::OBJECT_TYPE.key(a.object_type).nil? } end |