lib/MESH/heading.rb in mesh-medical-subject-headings-2.1.0 vs lib/MESH/heading.rb in mesh-medical-subject-headings-2.2.0

- old
+ new

@@ -1,10 +1,10 @@ module MESH class Heading include Comparable - attr_accessor :unique_id, :tree_numbers, :roots, :parents, :children, :useful, :descriptor_class, :default_locale, :semantic_types, :wikipedia_links + attr_accessor :unique_id, :tree_numbers, :roots, :parents, :children, :useful, :descriptor_class, :default_locale, :semantic_types, :wikipedia_links, :structured_entries attr_reader :linkified_summary def <=> other self.unique_id <=> other.unique_id end @@ -31,11 +31,10 @@ def entries(locale = default_locale) @entries[locale] ||= [] end - def has_ancestor(heading) return false if parents.empty? return true if parents.include? heading in_grandparents = parents.map { |p| p.has_ancestor(heading) } return in_grandparents.include? true @@ -110,9 +109,10 @@ @semantic_types = [] @roots = [] @parents = [] @children = [] @entries = {} + @structured_entries = [] @original_heading = {} @natural_language_name = {} @summary = {} @wikipedia_links = [] end