Class: Specify::Model::Discipline

Inherits:
Object
  • Object
show all
Includes:
Updateable
Defined in:
lib/specify/models/discipline.rb

Overview

Disciplines are the second lowest level of scope in a Specify::Database.

A Discipline belongs to the a Specify::Model::Division.

A Discipline has one or more instances of Specify::Model::Collection.

A Discipline has one Specify::Model::Taxonomy, and one Specify::Model::Geography (both of which can be shared with other instances of Discipline).

Instance Method Summary collapse

Methods included from Updateable

#before_update

Instance Method Details

#inspectObject

Creates a string representation of self.



44
45
46
# File 'lib/specify/models/discipline.rb', line 44

def inspect
  "#{self} name: #{self.Name}"
end

#nameObject

Returns a String that is the name of self.



49
50
51
# File 'lib/specify/models/discipline.rb', line 49

def name
  self.Name
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.



56
57
58
# File 'lib/specify/models/discipline.rb', line 56

def view_set(_collection = nil)
  view_set_dir&.view_set_object
end