Class: Doing::Items
Overview
Items Array
Instance Attribute Summary collapse
-
#sections ⇒ Object
Returns the value of attribute sections.
Instance Method Summary collapse
-
#add_section(section, log: false) ⇒ Object
Add a new section to the sections array.
-
#delete_item(item, single: false) ⇒ Object
Delete an item from the index.
-
#in_section(section) ⇒ Items
Get a new Items object containing only items in a specified section.
-
#initialize ⇒ Items
constructor
A new instance of Items.
-
#section?(section) ⇒ Boolean
Test if section already exists.
-
#section_titles ⇒ Array
List sections, title only.
-
#to_s ⇒ Object
Output sections and items in Doing file format.
-
#update_item(old_item, new_item) ⇒ Object
Update an item in the index with a modified item.
Methods inherited from Array
#highlight_tags, #log_tags, #nested_hash, #to_tags, #to_tags!
Constructor Details
#initialize ⇒ Items
Returns a new instance of Items.
Instance Attribute Details
#sections ⇒ Object
Returns the value of attribute sections.
Instance Method Details
#add_section(section, log: false) ⇒ Object
Add a new section to the sections array. Accepts either a Section object, or a title string that will be converted into a Section.
#delete_item(item, single: false) ⇒ Object
Delete an item from the index
#in_section(section) ⇒ Items
Get a new Items object containing only items in a specified section
#section?(section) ⇒ Boolean
Test if section already exists
#section_titles ⇒ Array
List sections, title only
#to_s ⇒ Object
Output sections and items in Doing file format
#update_item(old_item, new_item) ⇒ Object
Update an item in the index with a modified item