Skip to content

Commit

Permalink
Merge pull request #283 from AKSW/feature/addComment
Browse files Browse the repository at this point in the history
Add some comments
  • Loading branch information
white-gecko authored Feb 28, 2022
2 parents 5800582 + f621236 commit d290a9d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/jekyll/helper/rdf_class_extraction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,15 @@ def extract_template class_resource, hash_str
end

##
# Check at the end of the search for direct inheritance on highest level.
# Returns the most specific class resource from +class_list+ based on
# +current_best+.
# +resource+ is the original input of request_class_template.
#
def find_highlevel_inheritance current_best, class_list, resource #check at the end of the search for direct inheritance on highest level
# +class_list+ is the list of clases that the +resource+ is assigned to.
# +resource+ is the original input of request_class_template resp. the
# resource on which to decide.
#
def find_highlevel_inheritance current_best, class_list, resource
class_list.each{|resource|
resource.find_direct_superclasses.each{|uri|
@classResources[uri] ||= Jekyll::JekyllRdf::Drops::RdfResourceClass.new(RDF::URI(uri))
Expand Down Expand Up @@ -142,8 +146,8 @@ def consistence_templates(classRes, alternatives, resource)
@consistence[hash_str].push(classRes)
@consistence[hash_str].push([])
end if @consistence[hash_str].nil?
@consistence[hash_str][1].push(resource) # using a hash ensures that a warning is printed only once for each combination of templates
# and for each resource at most once
# using a hash ensures that a warning is printed only once for each combination of templates and for each resource at most once
@consistence[hash_str][1].push(resource)
@consistence[hash_str][0]
end

Expand Down

0 comments on commit d290a9d

Please sign in to comment.