Class: Parsers::Opera

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

Overview

Brave Bookmarks Parser

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rawdata) ⇒ Opera

Returns a new instance of Opera.



10
11
12
# File 'lib/bkmrq/parsers/opera.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/opera.rb', line 8

def rawdata
  @rawdata
end

Instance Method Details

#runObject



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

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