lib/rdf/model/statement.rb in rdf-0.0.8 vs lib/rdf/model/statement.rb in rdf-0.0.9
- old
+ new
@@ -125,9 +125,18 @@
def has_object?
!!object
end
##
+ # Returns `true` if the subject or object of this statement is a blank
+ # node.
+ #
+ # @return [Boolean]
+ def has_blank_nodes?
+ (has_object? && object.node?) || (has_subject? && subject.node?)
+ end
+
+ ##
# @param [Statement] other
# @return [Boolean]
def eql?(other)
other.is_a?(Statement) && self == other
end