Module: Expressir::Model::Identifier

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/expressir/model/identifier.rb', line 4

def self.included(mod)
  # Auto-include marker - all Identifier types can have remark_items
  mod.include(HasRemarkItems)

  mod.attribute :id, :string
  mod.attribute :remarks, :string, collection: true
  mod.attribute :remark_items,
                ::Expressir::Model::Declarations::RemarkItem, collection: true
  mod.attribute :untagged_remarks, ::Expressir::Model::RemarkInfo,
                collection: true

  mod.key_value do
    map "id", to: :id
    map "remarks", to: :remarks
    map "remark_items", to: :remark_items
    map "untagged_remarks", to: :untagged_remarks
  end
end