Method: Doing::StringQuery#rx?

Defined in:
lib/doing/string/query.rb

#rx?Boolean

Determines if receiver is surrounded by slashes or starts with single quote

Returns:

  • (Boolean)

    True if regex, False otherwise.



34
35
36
# File 'lib/doing/string/query.rb', line 34

def rx?
  self =~ %r{(^/.*?/$|^')}
end