Class: Bkmrq::BookmarkDir

Inherits:
Object
  • Object
show all
Defined in:
lib/bkmrq/bookmark.rb

Overview

Bookmark Directory

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ BookmarkDir

Returns a new instance of BookmarkDir.



22
23
24
25
# File 'lib/bkmrq/bookmark.rb', line 22

def initialize(name)
  @name = name
  @children = Set[]
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



20
21
22
# File 'lib/bkmrq/bookmark.rb', line 20

def children
  @children
end

#nameObject

Returns the value of attribute name.



20
21
22
# File 'lib/bkmrq/bookmark.rb', line 20

def name
  @name
end

Instance Method Details

#add_child(child) ⇒ Object



27
28
29
# File 'lib/bkmrq/bookmark.rb', line 27

def add_child(child)
  @children << child
end

#children?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/bkmrq/bookmark.rb', line 31

def children?
  @children.any?
end