Class: SycLink::Chrome

Inherits:
Importer show all
Defined in:
lib/syclink/chrome.rb

Overview

Importer for Google Chrome links

Constant Summary

Constants inherited from Importer

Importer::CLEANER

Instance Attribute Summary

Attributes inherited from Importer

#opts, #path

Instance Method Summary collapse

Methods inherited from Importer

#initialize, #links, #rows

Constructor Details

This class inherits a constructor from SycLink::Importer

Instance Method Details

#readObject

Reads the content of the Google Chrome bookmarks file



10
11
12
13
# File 'lib/syclink/chrome.rb', line 10

def read
  serialized = File.read(path)
  extract_links(JSON.parse(serialized)).flatten.each_slice(4).to_a
end