Module: Nosy::Parser::ParseChecks
- Included in:
- Nosy::Parser
- Defined in:
- lib/nosy/parser/parse_checks.rb
Instance Method Summary collapse
Instance Method Details
#has_messages_table(database) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/nosy/parser/parse_checks.rb', line 7 def ( database ) begin database.execute2( "select rowid, date, address, text, flags, is_madrid, madrid_flags, madrid_handle from message" ) rescue SQLite3::SQLException return false rescue SQLite3::NotADatabaseException return false end end |
#is_iphone_database(results) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/nosy/parser/parse_checks.rb', line 17 def is_iphone_database( results ) if ( results[0][0] == "ROWID" && results[0][1] == "date" && results[0][2] == "address" && results[0][3] == "text" && results[0][4] == "flags" && results[0][5] == "is_madrid" && results[0][6] == "madrid_flags" && results[0][7] == "madrid_handle") && results.count > 1 return true else return false end end |