Class: Folder
Overview
for recursively parsing bookmarks
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#each ⇒ Object
needed for Enumerable.
-
#initialize(json, title = "|") ⇒ Folder
constructor
A new instance of Folder.
Constructor Details
#initialize(json, title = "|") ⇒ Folder
Returns a new instance of Folder.
414 415 416 417 |
# File 'lib/bookmarks.rb', line 414 def initialize(json, title = "|") @title = title.gsub(/[:,'"]/, "-").downcase @json = json end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
413 414 415 |
# File 'lib/bookmarks.rb', line 413 def json @json end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
413 414 415 |
# File 'lib/bookmarks.rb', line 413 def title @title end |
Instance Method Details
#each ⇒ Object
needed for Enumerable
420 421 422 |
# File 'lib/bookmarks.rb', line 420 def each @json.each end |