Class: Specify::Model::Discipline

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

Instance Method Summary collapse

Instance Method Details

#before_saveObject


32
33
34
35
36
# File 'lib/specify/models/discipline.rb', line 32

def before_save
  self.Version += 1
  self.TimestampModified = Time.now
  super
end

#inspectObject

Returns a string containing a human-readable representation.


39
40
41
# File 'lib/specify/models/discipline.rb', line 39

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

#nameObject

Returns the name of self.


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

def name
  self.Name
end

#view_set(_collection = nil) ⇒ Object

Returns the ViewSetObject. The argument is only for ducktyping/overloading.


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

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