Permalink
Browse files

Note that #each_context only returns named contexts, not the default …

…context.

#has_context? checks for anything in the default context if the value is `false`.
  • Loading branch information...
1 parent 867e02e commit 9bbfe5e820d2e2f92e480230ed100058ee0f311f @gkellogg gkellogg committed Mar 18, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/rdf/mixin/enumerable.rb
@@ -492,7 +492,7 @@ def enum_object
alias_method :enum_objects, :enum_object
##
- # Returns all unique RDF contexts.
+ # Returns all unique RDF contexts, other than the default context.
#
# @param [Hash{Symbol => Boolean}] options
# @option options [Boolean] :unique (true)
@@ -510,14 +510,15 @@ def contexts(options = {})
##
# Returns `true` if `self` contains the given RDF context.
#
- # @param [RDF::Resource] value
+ # @param [RDF::Resource, false] value
+ # Use value `false` to query for the default context
# @return [Boolean]
def has_context?(value)
enum_context.include?(value)
end
##
- # Iterates the given block for each unique RDF context.
+ # Iterates the given block for each unique RDF context, other than the default context.
#
# If no block was given, returns an enumerator.
#

0 comments on commit 9bbfe5e

Please sign in to comment.