Class: Parsers::Safari

Inherits:
Object
  • Object
show all
Defined in:
lib/bkmrq/parsers/safari.rb

Overview

Brave Bookmarks Parser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rawdata) ⇒ Safari

Returns a new instance of Safari.



10
11
12
# File 'lib/bkmrq/parsers/safari.rb', line 10

def initialize(rawdata)
  @rawdata = rawdata
end

Instance Attribute Details

#rawdataObject

Returns the value of attribute rawdata.



8
9
10
# File 'lib/bkmrq/parsers/safari.rb', line 8

def rawdata
  @rawdata
end

Instance Method Details

#runObject



14
15
16
17
# File 'lib/bkmrq/parsers/safari.rb', line 14

def run
  Oj.load(rawdata)
    .then { |parsed_bookmarks| parsed_bookmarks['roots'] }
end