lib/grumlin/expressions/text_p.rb in grumlin-0.23.0 vs lib/grumlin/expressions/text_p.rb in grumlin-1.0.0.rc1
- old
+ new
@@ -1,15 +1,11 @@
# frozen_string_literal: true
-module Grumlin
- module Expressions
- class TextP < P
- class << self
- %i[containing endingWith notContaining notEndingWith notStartingWith startingWith].each do |predicate|
- define_method predicate do |*args|
- P::Predicate.new("TextP", predicate, value: args[0])
- end
- end
+class Grumlin::Expressions::TextP < Grumlin::Expressions::P
+ class << self
+ [:containing, :endingWith, :notContaining, :notEndingWith, :notStartingWith, :startingWith].each do |predicate|
+ define_method predicate do |*args|
+ P::Predicate.new("TextP", predicate, value: args[0])
end
end
end
end