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
1082 1083 1084 1085 1086 |
# File 'lib/sexp_matcher.rb', line 1082 def / pattern inject(self.class.new) { |result, match| result.concat match / pattern } end |
#inspect ⇒ Object Also known as: to_s
:nodoc:
1088 1089 1090 |
# File 'lib/sexp_matcher.rb', line 1088 def inspect # :nodoc: "MatchCollection.new(%s)" % self.to_a.inspect[1..-2] end |
#pretty_print(q) ⇒ Object
:nodoc:
1094 1095 1096 1097 1098 |
# File 'lib/sexp_matcher.rb', line 1094 def pretty_print q # :nodoc: q.group 1, "MatchCollection.new(", ")" do q.seplist(self) {|v| q.pp v } end end |