Class: Nosy::Parser
- Inherits:
-
Object
- Object
- Nosy::Parser
- Includes:
- Imessage, MessageSupport, ParseChecks, Smsmessage
- Defined in:
- lib/nosy/parser.rb,
lib/nosy/parser/imessage.rb,
lib/nosy/parser/smsmessage.rb,
lib/nosy/parser/parse_checks.rb,
lib/nosy/parser/message_support.rb
Defined Under Namespace
Modules: Imessage, MessageSupport, ParseChecks, Smsmessage
Instance Method Summary collapse
Methods included from Smsmessage
#received_sms_message, #sent_sms_message
Methods included from Imessage
#received_imessage, #sent_group_imessage, #sent_imessage
Methods included from ParseChecks
#has_messages_table, #is_iphone_database
Methods included from MessageSupport
#find_all_messages, #parse_imessage, #parse_sms_message
Instance Method Details
#can_parse?(file) ⇒ Boolean
18 19 20 21 22 |
# File 'lib/nosy/parser.rb', line 18 def can_parse?(file) db = SQLite3::Database.new( file ) results = (db) db != false && results != false ? is_iphone_database( results ) : false end |
#parse(file) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/nosy/parser.rb', line 24 def parse(file) ( file ).map do || = Message.new("", "", [3], "", "") if [5] == 1 ( , ) else ( , ) end end end |