Class: Specify::Model::Collection
- Inherits:
-
Object
- Object
- Specify::Model::Collection
- Includes:
- Updateable
- Defined in:
- lib/specify/models/collection.rb
Overview
Collections are the lowest level of scope in a Specify::Database.
A Collection belongs to the a Specify::Model::Discipline.
A Collection contains all instances of Specify::Model::CollectionObject belonging to that collection.
Instance Method Summary collapse
-
#embedded_collecting_event? ⇒ Boolean
Returns
falseif Specify::Model::CollectionObject instances inselfcan share Specify::Model::CollectingEvent instances. -
#highest_catalog_number ⇒ Object
Returns the highest Specify::Model::CollectionObject#catalog_number for collection_objects belonging to
self. -
#inspect ⇒ Object
Creates a string representation of
self. -
#name ⇒ Object
Returns a String that is the name of
self. -
#view_set(_collection = nil) ⇒ Object
Returns the Specify::Model::ViewSetObject that belongs to
self.
Methods included from Updateable
Instance Method Details
#embedded_collecting_event? ⇒ Boolean
Returns false if Specify::Model::CollectionObject instances in self can share Specify::Model::CollectingEvent instances. false otherwise.
39 40 41 |
# File 'lib/specify/models/collection.rb', line 39 def self[:IsEmbeddedCollectingEvent] end |
#highest_catalog_number ⇒ Object
Returns the highest Specify::Model::CollectionObject#catalog_number for collection_objects belonging to self.
45 46 47 |
# File 'lib/specify/models/collection.rb', line 45 def highest_catalog_number collection_objects_dataset.max(:CatalogNumber) end |
#inspect ⇒ Object
Creates a string representation of self.
50 51 52 |
# File 'lib/specify/models/collection.rb', line 50 def inspect "#{self} name: #{self.CollectionName}" end |
#name ⇒ Object
Returns a String that is the name of self.
55 56 57 |
# File 'lib/specify/models/collection.rb', line 55 def name self[:CollectionName] end |
#view_set(_collection = nil) ⇒ Object
Returns the Specify::Model::ViewSetObject that belongs to self. The _collection argument will be discared and is only there to allow intances to be used as a Specify::Service::ViewLoader#target.
62 63 64 |
# File 'lib/specify/models/collection.rb', line 62 def view_set(_collection = nil) view_set_dir&.view_set_object end |