Class: Extractors::Opera
- Inherits:
-
Object
- Object
- Extractors::Opera
- Defined in:
- lib/bkmrq/extractors/opera.rb
Overview
Chrome Bookmarks Extractor
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extract ⇒ Object
8 9 10 |
# File 'lib/bkmrq/extractors/opera.rb', line 8 def self.extract new.extract end |
Instance Method Details
#bookmarks_path ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bkmrq/extractors/opera.rb', line 16 def bookmarks_path case RbConfig::CONFIG['host_os'] when /mswin|msys|mingw|cygwin|bccwin|wince/i File.('~/AppData/Roaming/Opera Software/Opera Stable/Bookmarks') when /darwin|mac os/i File.('~/Library/Application Support/Opera Software/Opera Stable/Bookmarks') when /linux/i, /solaris|bsd/i File.('~/.config/opera/Bookmarks') else raise Bkmrq::Extractors::Error, 'bkmrq is not supported on your OS.' end end |
#extract ⇒ Object
12 13 14 |
# File 'lib/bkmrq/extractors/opera.rb', line 12 def extract File.read(bookmarks_path) end |