Module: Columns::Regex
- Defined in:
- lib/columns/regex.rb
Overview
Public: Utility methods related to regular expressions.
Class Method Summary collapse
-
.table_name(string) ⇒ Object
Public: Find a table name if it exists.
Class Method Details
.table_name(string) ⇒ Object
Public: Find a table name if it exists.
string - The String to scan for a table name.
Returns a String table name or nil.
11 12 13 |
# File 'lib/columns/regex.rb', line 11 def self.table_name(string) string.match(/create_table\s*"(\w\w*)"/) {|matchdata| matchdata[1] } end |