lib/onoma/nomenclature.rb
# Returns the best match on nomenclature properties
Returns the best match on nomenclature properties
Returns the best match on nomenclature properties
def best_match(property_name, searched_item)
      items = []
      begin
        list.select do |item|
          items << item if item.property(property_name) == searched_item.name
        end
        break if items.any?
        searched_item = searched_item.parent
      end while searched_item
      items
    end
def best_match ( property_name , searched_item ) items = [ ] begin list . select do | item | items << item if item . property ( property_name ) == searched_item . name end break if items . any? searched_item = searched_item . parent end while searched_item items end
Returns the best match on nomenclature properties
Returns the best match on nomenclature properties
property_name
<not_specific>
searched_item
<not_specific>