lib/marc/spec/queries/query.rb in ruby-marc-spec-0.1.0 vs lib/marc/spec/queries/query.rb in ruby-marc-spec-0.1.1
- old
+ new
@@ -16,9 +16,13 @@
@selector = ensure_type(selector, Applicable, allow_nil: true)
@condition = ensure_type(condition, Condition, allow_nil: true)
@subqueries = subqueries.map { |sq| ensure_type(sq, Query) }
end
+ def tag_str
+ tag.to_s if tag
+ end
+
def to_s
StringIO.new.tap do |out|
out << tag if tag
out << selector if selector
out << "{#{condition}}" if condition