Class: Booker::Folder
- Inherits:
-
Object
- Object
- Booker::Folder
- Defined in:
- lib/booker/bookmarks.rb
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.
Class Method Summary collapse
-
.normalize(title) ⇒ Object
the browsers disagree about what punctuation belongs in a folder name, so every parser normalizes through here rather than carrying its own copy of the rule for the levels it builds itself.
Instance Method Summary collapse
-
#initialize(json, title = "|") ⇒ Folder
constructor
A new instance of Folder.
Constructor Details
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
129 130 131 |
# File 'lib/booker/bookmarks.rb', line 129 def json @json end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
129 130 131 |
# File 'lib/booker/bookmarks.rb', line 129 def title @title end |
Class Method Details
.normalize(title) ⇒ Object
the browsers disagree about what punctuation belongs in a folder name, so every parser normalizes through here rather than carrying its own copy of the rule for the levels it builds itself
134 |
# File 'lib/booker/bookmarks.rb', line 134 def self.normalize(title) = title.gsub(/[:,'"]/, "-").downcase |