Class: Identifier::Unknown

Inherits:
Identifier
  • Object
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

Instance Method Summary collapse

Instance Attribute Details

#identifierString

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, scope: [:project_id]

  protected

  def set_cached
    update_column(:cached, identifier)
  end
end

Instance Method Details

#set_cachedObject (protected)



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

def set_cached
  update_column(:cached, identifier)
end