class String
Public Instance Methods
contentise()
click to toggle source
# File lib/curacao/matcher/have_content.rb, line 28 def contentise # split into lines, strip spaces from ends, ding blank lines self.strip.split("\n").map { |l| l.strip }.reject { |l| l == '' } end
is_regex()
click to toggle source
# File lib/curacao/matcher/have_content.rb, line 40 def is_regex ! /^\/.*\/$/.match(self.strip).nil? end
matches(other)
click to toggle source
# File lib/curacao/matcher/have_content.rb, line 33 def matches other if self.is_regex return ! (self.to_regex.match other).nil? end self == other end
to_regex()
click to toggle source
# File lib/curacao/matcher/have_content.rb, line 44 def to_regex Regexp.new self[1..-2] end