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(title = '|', json) ⇒ Folder
constructor
A new instance of Folder.
Constructor Details
#initialize(title = '|', json) ⇒ Folder
Returns a new instance of Folder.
126 127 128 129 |
# File 'lib/bookmarks.rb', line 126 def initialize(title='|', json) @title = title.gsub(/[:,'"]/, '-').downcase @json = json end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
125 126 127 |
# File 'lib/bookmarks.rb', line 125 def json @json end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
125 126 127 |
# File 'lib/bookmarks.rb', line 125 def title @title end |
Instance Method Details
#each ⇒ Object
needed for Enumerable
132 |
# File 'lib/bookmarks.rb', line 132 def each() @json.each end |