Class: ImportEverything::SqlInsertParser::LineParser
Instance Attribute Summary collapse
Class Method Summary
collapse
def_logging_method, log_method
Methods inherited from LineParser
#row_hashes, #value_hashes
Instance Attribute Details
Returns the value of attribute line.
32
33
34
|
# File 'lib/import_everything/parsers/sql_parser.rb', line 32
def line
@line
end
|
Class Method Details
54
55
56
|
# File 'lib/import_everything/parsers/sql_parser.rb', line 54
def (str)
!!(str =~ )
end
|
.probable_insert?(str) ⇒ Boolean
46
47
48
49
50
|
# File 'lib/import_everything/parsers/sql_parser.rb', line 46
def probable_insert?(str)
str = str.strip
res = (str =~ insert_into_regex) && !(str)
!!res
end
|
.valid_insert?(str) ⇒ Boolean
51
52
53
|
# File 'lib/import_everything/parsers/sql_parser.rb', line 51
def valid_insert?(str)
!!(str =~ full_regex)
end
|