Class: CaTissue::ExternalIdentifier

Inherits:
Object
  • Object
show all
Includes:
CaRuby::Resource::Unique, Resource
Defined in:
lib/catissue/domain/external_identifier.rb,
lib/catissue/domain/uniquify.rb

Overview

The ExternalIdentifier domain class.

Instance Method Summary collapse

Methods included from Resource

#database, included, #tolerant_match?

Methods included from Annotatable

#annotation_proxy, #create_proxy, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class CaTissue::Annotatable

Instance Method Details

#uniquifyObject

Makes this ExternalIdentifier’s value unique.



61
62
63
64
65
66
# File 'lib/catissue/domain/uniquify.rb', line 61

def uniquify
  oldval = value || return
  newval = uniquify_value(oldval)
  self.value = newval
  logger.debug { "Reset #{qp} value from #{oldval} to unique value #{newval}." }
end

#value=(value) ⇒ Object

Sets this ExternalIdentifier value to the given value. A Numeric value is converted to a String.



13
14
15
16
# File 'lib/catissue/domain/external_identifier.rb', line 13

def value=(value)
  value = value.to_s if value
  setValue(value)
end