Class: Identifier::Unknown

Inherits:
Identifier show all
Defined in:
app/models/identifier/unknown.rb

Overview

The identifier whose origin and scope is unknown (i.e. can not be deduced after effort).

Instantiating this class asserts that a namespace can not be determined.

Instance Attribute Summary (collapse)

Attributes inherited from Identifier

#cached, #identifier_object_id, #namespace_id, #project_id, #type

Instance Method Summary (collapse)

Methods inherited from Identifier

find_for_autocomplete, prototype_identifier, #type_name

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods included from ActiverecordUtilities

#trim_attributes

Instance Attribute Details

- (String) identifier

The verbatim value of this identifier.

Returns:

  • (String)


8
9
10
11
12
13
14
15
16
17
# File 'app/models/identifier/unknown.rb', line 8

class Identifier::Unknown < Identifier

  validates_uniqueness_of :identifier

  protected

  def set_cached
    update_column(:cached, identifier)
  end 
end

Instance Method Details

- (Object) set_cached (protected)



14
15
16
# File 'app/models/identifier/unknown.rb', line 14

def set_cached
  update_column(:cached, identifier)
end