Class: Taxonifi::Model::GeogCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/taxonifi/model/geog_collection.rb

Overview

Collection of geog objects. TODO: Consider moving the row index to the base collection (those this doesn’t always make sense).

Instance Attribute Summary collapse

Attributes inherited from Collection

#by_id_index, #collection, #current_free_id

Instance Method Summary collapse

Methods inherited from Collection

#add_object, #add_object_pre_indexed, #children_of_object, #object_by_id, #objects_without_parents, #parent_id_vector, subclass_prefixes

Methods included from SharedClassMethods

included

Constructor Details

#initialize(options = {}) ⇒ GeogCollection

Returns a new instance of GeogCollection.



11
12
13
14
15
# File 'lib/taxonifi/model/geog_collection.rb', line 11

def initialize(options = {})
  super
  @row_index = []
  true
end

Instance Attribute Details

#row_indexObject

Returns the value of attribute row_index.



9
10
11
# File 'lib/taxonifi/model/geog_collection.rb', line 9

def row_index
  @row_index
end

Instance Method Details

#object_classObject



22
23
24
# File 'lib/taxonifi/model/geog_collection.rb', line 22

def object_class
  Taxonifi::Model::Geog
end

#object_from_row(row_number) ⇒ Object

Return the object represented by a row.



18
19
20
# File 'lib/taxonifi/model/geog_collection.rb', line 18

def object_from_row(row_number)
  @row_index[row_number]
end