Class: Nhgis::GeogLevelCollection
- Inherits:
-
Object
- Object
- Nhgis::GeogLevelCollection
- Defined in:
- app/models/nhgis/geog_level_collection.rb
Instance Attribute Summary collapse
-
#geog_level_groups ⇒ Object
Returns the value of attribute geog_level_groups.
-
#geogs_with_boundary_files ⇒ Object
Returns the value of attribute geogs_with_boundary_files.
-
#preselected_geog_levels ⇒ Object
Returns the value of attribute preselected_geog_levels.
Instance Method Summary collapse
-
#initialize(preselected_geog_levels, available_geog_levels) ⇒ GeogLevelCollection
constructor
A new instance of GeogLevelCollection.
Constructor Details
#initialize(preselected_geog_levels, available_geog_levels) ⇒ GeogLevelCollection
Returns a new instance of GeogLevelCollection.
8 9 10 11 12 |
# File 'app/models/nhgis/geog_level_collection.rb', line 8 def initialize(preselected_geog_levels, available_geog_levels) @preselected_geog_levels = GeogLevel.find_all_by_istads_id(preselected_geog_levels).sort{|a,b| a.istads_seq <=> b.istads_seq} @geog_level_groups = GeogLevelGroup.all_geog_level_groups_using(preselected_geog_levels, available_geog_levels) @geogs_with_boundary_files = GeogLevel.find_geog_levels_having_shapefiles.map{|obj|obj.istads_id} end |
Instance Attribute Details
#geog_level_groups ⇒ Object
Returns the value of attribute geog_level_groups.
6 7 8 |
# File 'app/models/nhgis/geog_level_collection.rb', line 6 def geog_level_groups @geog_level_groups end |
#geogs_with_boundary_files ⇒ Object
Returns the value of attribute geogs_with_boundary_files.
4 5 6 |
# File 'app/models/nhgis/geog_level_collection.rb', line 4 def geogs_with_boundary_files @geogs_with_boundary_files end |
#preselected_geog_levels ⇒ Object
Returns the value of attribute preselected_geog_levels.
5 6 7 |
# File 'app/models/nhgis/geog_level_collection.rb', line 5 def preselected_geog_levels @preselected_geog_levels end |