@@ -40,19 +40,27 @@ module Value
4040 # Use value `false` to query for the default graph_name
4141 # @return [Boolean]
4242 def graph? ( *args )
43- false
4443 case args . length
4544 when 0 , 1 then false
4645 else raise ArgumentError ( "wrong number of arguments (given #{ args . length } , expected 0 or 1)" )
4746 end
4847 end
4948
5049 ##
51- # Is this a {RDF::Statement}?
50+ # @overload statement?
51+ # Returns `true` if `self` is a {RDF::Statement}.
5252 #
53- # @return [Boolean]
54- def statement?
55- false
53+ # @return [Boolean]
54+ # @overload statement?(statement)
55+ # Returns `true` if `self` contains the given {RDF::Statement}.
56+ #
57+ # @param [RDF::Statement] statement
58+ # @return [Boolean]
59+ def statement? ( *args )
60+ case args . length
61+ when 0 , 1 then false
62+ else raise ArgumentError ( "wrong number of arguments (given #{ args . length } , expected 0 or 1)" )
63+ end
5664 end
5765
5866 ##
@@ -64,11 +72,20 @@ def list?
6472 end
6573
6674 ##
67- # Is this a {RDF::Term}?
75+ # @overload term?
76+ # Returns `true` if `self` is a {RDF::Term}.
6877 #
69- # @return [Boolean]
70- def term?
71- false
78+ # @return [Boolean]
79+ # @overload term?(name)
80+ # Returns `true` if `self` contains the given RDF subject term.
81+ #
82+ # @param [RDF::Resource] value
83+ # @return [Boolean]
84+ def term? ( *args )
85+ case args . length
86+ when 0 , 1 then false
87+ else raise ArgumentError ( "wrong number of arguments (given #{ args . length } , expected 0 or 1)" )
88+ end
7289 end
7390
7491 ##
@@ -114,12 +131,21 @@ def uri?
114131 end
115132
116133 ##
117- # Is this a {RDF::Query::Variable}, or does it contain a variable?
134+ # @overload variable?
135+ # Returns `true` if `self` is a {RDF::Query::Variable}, or does it contain a variable?
118136 #
119- # @return [Boolean]
137+ # @return [Boolean]
138+ # @overload variable?(variable)
139+ # Returns `true` if `self` contains the given variable.
140+ #
141+ # @param [RDF::Resource] value
142+ # @return [Boolean]
120143 # @since 0.1.7
121- def variable?
122- false
144+ def variable? ( *args )
145+ case args . length
146+ when 0 , 1 then false
147+ else raise ArgumentError ( "wrong number of arguments (given #{ args . length } , expected 0 or 1)" )
148+ end
123149 end
124150
125151 ##
0 commit comments