Method: JsDuck::Merger#add_shared

Defined in:
lib/jsduck/merger.rb

#add_shared(hash, doc_map) ⇒ Object

Detects properties common for each doc-object and adds them



228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/jsduck/merger.rb', line 228

def add_shared(hash, doc_map)
  hash.merge!({
    :inheritable => !!doc_map[:inheritable],
    :inheritdoc => doc_map[:inheritdoc] ? doc_map[:inheritdoc].first : nil,
    :meta => detect_meta(doc_map),
  })
  # copy :private also to main hash
  hash[:private] = true if hash[:meta][:private]

  hash[:id] = create_member_id(hash)

  return hash
end