Class: Parsers::Safari
- Inherits:
-
Object
- Object
- Parsers::Safari
- Defined in:
- lib/bkmrq/parsers/safari.rb
Overview
Brave Bookmarks Parser
Instance Attribute Summary collapse
-
#rawdata ⇒ Object
Returns the value of attribute rawdata.
Instance Method Summary collapse
-
#initialize(rawdata) ⇒ Safari
constructor
A new instance of Safari.
- #run ⇒ Object
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
#rawdata ⇒ Object
Returns the value of attribute rawdata.
8 9 10 |
# File 'lib/bkmrq/parsers/safari.rb', line 8 def rawdata @rawdata end |
Instance Method Details
#run ⇒ Object
14 15 16 17 |
# File 'lib/bkmrq/parsers/safari.rb', line 14 def run Oj.load(rawdata) .then { |parsed_bookmarks| parsed_bookmarks['roots'] } end |