lib/pupa/models/concerns/identifiable.rb in pupa-0.0.5 vs lib/pupa/models/concerns/identifiable.rb in pupa-0.0.6
- old
+ new
@@ -3,10 +3,17 @@
# Adds the Popolo `identifiers` property to a model.
module Identifiable
extend ActiveSupport::Concern
included do
- attr_accessor :identifiers
+ attr_reader :identifiers
+ end
+
+ # Sets the identifiers.
+ #
+ # @param [Array] identifiers a list of identifiers
+ def identifiers=(identifiers)
+ @identifiers = IdentifierList.new(identifiers)
end
# Adds an issued identifier.
#
# @param [String] identifier an issued identifier, e.g. a DUNS number