lib/sparql/algebra/expression.rb in sparql-0.0.2 vs lib/sparql/algebra/expression.rb in sparql-0.1.0
- old
+ new
@@ -237,11 +237,11 @@
# Subclasses can override this method in order to implement something
# more useful.
#
# @return [Array] `self`
# @see http://openjena.org/wiki/SSE
- def to_sse
+ def to_sxp_bin
self
end
private
# @overload: May be called with node, message and an option hash
@@ -272,10 +272,15 @@
options = args.last.is_a?(Hash) ? args.pop : {}
return unless options[:debug]
message = args.join(": ")
message = message + yield if block_given?
depth = options[:depth] || 0
- $stderr.puts("#{' ' * depth}#{message}") if options[:debug]
+ case options[:debug]
+ when Array
+ options[:debug] << "#{' ' * depth}#{message}"
+ else
+ $stderr.puts("#{' ' * depth}#{message}")
+ end
end
def debug(*args, &block)
Expression.debug(*args, &block)
end