Class: Sexp::MatchCollection
Overview
Instance Method Summary collapse
-
#/(pattern) ⇒ Object
See Traverse#search.
-
#inspect ⇒ Object
(also: #to_s)
:nodoc:.
-
#pretty_print(q) ⇒ Object
:nodoc:.
Instance Method Details
#/(pattern) ⇒ Object
See Traverse#search
1400 1401 1402 1403 1404 |
# File 'lib/sexp.rb', line 1400 def / pattern inject(self.class.new) { |result, match| result.concat match / pattern } end |
#inspect ⇒ Object Also known as: to_s
:nodoc:
1406 1407 1408 |
# File 'lib/sexp.rb', line 1406 def inspect # :nodoc: "MatchCollection.new(%s)" % self.to_a.inspect[1..-2] end |
#pretty_print(q) ⇒ Object
:nodoc:
1412 1413 1414 1415 1416 |
# File 'lib/sexp.rb', line 1412 def pretty_print q # :nodoc: q.group 1, "MatchCollection.new(", ")" do q.seplist(self) {|v| q.pp v } end end |