Class: Folder

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

Overview

basic folder class, for parsing bookmarks

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Folder.



5
6
7
8
# File 'lib/folder.rb', line 5

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

Instance Method Details

#eachObject



18
19
20
# File 'lib/folder.rb', line 18

def each
  @json.each
end

#jsonObject



14
15
16
# File 'lib/folder.rb', line 14

def json
  @json
end

#titleObject



10
11
12
# File 'lib/folder.rb', line 10

def title
  @title
end