Class: Folder

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/bookmarks.rb

Overview

for recursively parsing bookmarks

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title = '|', json) ⇒ Folder

Returns a new instance of Folder.



123
124
125
126
# File 'lib/bookmarks.rb', line 123

def initialize(title='|', json)
  @title = title.gsub(/[:,'"]/, '-').downcase
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



122
123
124
# File 'lib/bookmarks.rb', line 122

def json
  @json
end

#titleObject (readonly)

Returns the value of attribute title.



122
123
124
# File 'lib/bookmarks.rb', line 122

def title
  @title
end

Instance Method Details

#eachObject

needed for Enumerable



129
# File 'lib/bookmarks.rb', line 129

def each() @json.each end